DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

42.10. pg_autovacuum

The catalog pg_autovacuum stores optional per-relation configuration parameters for The auto-vacuum daemon. If there is an entry here for a particular relation, the given parameters will be used for autovacuuming that table. If no entry is present, the system-wide defaults will be used.

Table 42-10. pg_autovacuum Columns

NameTypeReferencesDescription
vacrelidoidpg_class.oidThe table this entry is for
enabledbool If false, this table is never autovacuumed
vac_base_threshinteger Minimum number of modified tuples before vacuum
vac_scale_factorfloat4 Multiplier for reltuples to add to vac_base_thresh
anl_base_threshinteger Minimum number of modified tuples before analyze
anl_scale_factorfloat4 Multiplier for reltuples to add to anl_base_thresh
vac_cost_delayinteger Custom vacuum_cost_delay parameter
vac_cost_limitinteger Custom vacuum_cost_limit parameter

The autovacuum daemon will initiate a VACUUM operation on a particular table when the number of updated or deleted tuples exceeds vac_base_thresh plus vac_scale_factor times the number of live tuples currently estimated to be in the relation. Similarly, it will initiate an ANALYZE operation when the number of inserted, updated or deleted tuples exceeds anl_base_thresh plus anl_scale_factor times the number of live tuples currently estimated to be in the relation.

Any of the numerical fields can contain -1 (or indeed any negative value) to indicate that the system-wide default should be used for this particular value. Observe that the vac_cost_delay variable inherits its default value from the autovacuum_vacuum_cost_delay configuration parameter, or from vacuum_cost_delay if the former is set to a negative value. The same applies to vac_cost_limit.