PostgreSQL DBA

Vacuum, Autovacuum, Bloat & Wraparound

Question

Standard VACUUM versus VACUUM FULL: what space does each reclaim, and when should each be used?

Answer

Standard VACUUM makes dead-tuple space reusable within the table while allowing normal reads and writes. VACUUM FULL rewrites the table and returns space to the operating system under an ACCESS EXCLUSIVE lock. Use FULL for exceptional, planned physical shrinkage.

This is 7 of 23 free samples for PostgreSQL DBA.

More PostgreSQL DBA topic samples