What Laurenz said.
But, quoting the manual:
To vacuum a table, one must ordinarily be the table's owner or a
superuser. However, database owners are allowed to vacuum all tables
in their databases, except shared catalogs. (The restriction for
shared catalogs means that a true database-wide VACUUM
can only be
performed by a superuser.) VACUUM
will skip over any tables that the
calling user does not have permission to vacuum.
Meaning, if you have issued VACUUM FULL
as superuser, shared objects may also be affected, and you need to dump and restore the whole cluster to be sure: (pg_dumpall
). (Typically, the lion's share of zombi-files would be located in the directory of the affected database, though.)
I thought of creating a new database based on the afflicted one as TEMPLATE
directly, which is much faster than a full dump/restore cycle. (Would require sufficient available storage, of course). Unfortunately, since that just copies physical files of a database, it would include the zombi-files you are trying to get rid of.
Remember that you need sufficient free space for a complete pg_dump
. The dump file can be bigger or smaller than the database itself. Since you have problems with available free storage, consider dumping to a different physical location.