PostgreSQL · Concept
Autovacuum
PostgreSQL uses VACUUM to maintain tables: it reuses space, refreshes planner statistics, updates visibility data, and freezes old rows. Autovacuum performs this work automatically when table activity reaches configured thresholds.
Last updated
Syntax
VACUUM [ ( option [, ...] ) ] [ table_and_columns [, ...] ]
ANALYZE [ ( option [, ...] ) ] [ table_and_columns [, ...] ]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
VACUUM FULLANALYZEautovacuumautovacuum_max_workersautovacuum_naptimeautovacuum_vacuum_thresholdautovacuum_vacuum_scale_factorautovacuum_analyze_threshold