PG Settings Autovacuum

Properties

PropertyTypeRequiredDescription
autovacuum_analyze_scale_factornumbernoSpecifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. 0.2 for 20% of the table size). The default is 0.2.
autovacuum_analyze_thresholdintegernoSpecifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50.
autovacuum_freeze_max_ageintegernoSpecifies the maximum age (in transactions) that a table’s pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart.
autovacuum_max_workersintegernoSpecifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is 3. Changing this parameter causes a service restart.
autovacuum_naptimeintegernoSpecifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is 60.
autovacuum_vacuum_cost_delayintegernoSpecifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_delay value will be used. The default is 2 (upstream default).
autovacuum_vacuum_cost_limitintegernoSpecifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_limit value will be used. The default is -1 (upstream default).
autovacuum_vacuum_scale_factornumbernoSpecifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. 0.2 for 20% of the table size). The default is 0.2.
autovacuum_vacuum_thresholdintegernoSpecifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50.
log_autovacuum_min_durationintegernoCauses each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one disables logging autovacuum actions. The default is 1000.
Last updated on