質問

If I do a VACUUM on a Postgres table (without the FULL option) I know that it should make any free-space available to the database, but not the operating system.

Should it make the freespace available to any database object? or just the table that's been vacuumed?

役に立ちましたか?

解決

After a VACUUM the table will be as big as before, just more of the space will be free and available for future INSERTs and UPDATEs. In other words, the file won't shrink (1). So the space will not be available for other tables, only for the table that has been vacuumed.

Note (1): Sometimes the file will shrink. If the last block is completely empty after the VACUUM, PostgreSQL will try to truncate all empty blocks off the end of the table.

ライセンス: CC-BY-SA帰属
所属していません dba.stackexchange
scroll top