I'm getting an error for around half of my tables in Postgres while trying to run VACUUM FULL.

For example, I have a table named 'qwerty', and when i try to vacuum it i get the following error:

ERROR: could not fsync file "base/16392/3655838": Input/output error

But for some reason, when i run:

SELECT pg_relation_filepath('qwerty');

It shows the file path as another:


I cant seem to find any information about this online, I would be more than glad if anybody could help!

  • Firstly, this isn't a programming question, but rather a database one, and as such belongs on dba, not here on Stack Overflow. Secondly it's impossible for us to tell you a conclusive answer with the information provided. Is the disk full, by any chance? Is the file-system corrupt? Does the disk have other I/O issues? Consider moving your question to dba and add the details I'm asking for ....
    – tink
    Apr 10, 2021 at 20:24

1 Answer 1


The file that PostgreSQL tries to sync is probably the new file created during VACUUM (FULL). This system call persists the file to disk so that it cannot get lost during a crash.

Perhaps your disk is having hardware problems, or you are using a file system that has problems with that (which you shouldn't do).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.