Autovacuum Parameters
autovacuum
Boolean type. Whether to enable automatic cleanup. Default value on. When enabled, track_counts must also be on.
autovacuum = on # Enable autovacuum subprocess? 'on'
# requires track_counts to also be on.
autovacuum_max_workers
Numeric type. Maximum number of cleanup worker processes. Default value 3. This parameter can only be set at instance startup.
autovacuum_max_workers = 3 # max number of autovacuum subprocesses
# (change requires restart)
autovacuum_vacuum_threshold
Numeric type. Minimum number of row updates to trigger cleanup. Default value 50.
autovacuum_vacuum_threshold = 50 # min number of row updates before
# vacuum
autovacuum_vacuum_scale_factor
Numeric type. Scale factor for triggering cleanup by update (UPDATE) and delete (DELETE) operations. The trigger threshold is determined by the formula autovacuum_vacuum_scale_factor x total table rows + autovacuum_vacuum_threshold. Default value 0.2 (20%).
autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
autovacuum_vacuum_insert_threshold
Numeric type. Minimum number of insert (INSERT) operations to trigger cleanup. Default value 1000. Set to -1 to disable insert cleanup.
autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts
# before vacuum; -1 disables insert
# vacuums
autovacuum_vacuum_insert_scale_factor
Numeric type. Scale factor for triggering cleanup by insert operations. The trigger threshold is determined by the formula autovacuum_vacuum_insert_scale_factor x total table rows + autovacuum_vacuum_insert_threshold. Default value 0.2 (20%).
autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table
# size before insert vacuum
autovacuum_analyze_threshold
Numeric type. Minimum number of row updates to trigger statistics collection (ANALYZE). Default value 50.
autovacuum_analyze_threshold = 50 # min number of row updates before
# analyze
autovacuum_analyze_scale_factor
Numeric type. Scale factor for triggering statistics collection (ANALYZE) by insert, update, and delete operations. The trigger threshold is determined by the formula autovacuum_analyze_scale_factor x total table rows + autovacuum_analyze_threshold. Default value 0.1 (10%).
autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
autovacuum_freeze_max_age
Numeric type. Maximum transaction age allowed on a table. If this value is exceeded, transactions on that table will be forcibly frozen. Default value 200000000. This parameter can only be set at instance startup.
autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)