PG Settings Autovacuum

Properties

  • log_autovacuum_min_duration (integer): Causes 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.
  • autovacuum_vacuum_cost_limit (integer): Specifies 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_max_workers (integer): Specifies 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_vacuum_threshold (integer): Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50.
  • autovacuum_naptime (integer): Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is 60.
  • autovacuum_vacuum_scale_factor (number): Specifies 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_cost_delay (integer): Specifies 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_analyze_scale_factor (number): Specifies 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_threshold (integer): Specifies 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_age (integer): Specifies 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.
Last updated on