What is Vacuum?
A PostgreSQL maintenance operation that reclaims storage from dead tuples and updates statistics for the query planner.
PostgreSQL's MVCC creates dead tuples when rows are updated or deleted. VACUUM marks this space for reuse (but does not return it to the OS). VACUUM FULL rewrites the entire table, recovering disk space but requiring an exclusive lock.
Autovacuum runs automatically based on configurable thresholds. ANALYZE updates statistics used by the query planner. Proper vacuum configuration is critical for maintaining database performance and preventing table bloat.