Type: | real |
Default: | 2 (2ms) |
Min: | -1 (-1) |
Max: | 100 (100ms) |
Unit: | milliseconds (ms) |
Context: | sighup |
Restart: | false |
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. If this value is specified without units, it is taken as milliseconds. The default value is 2 milliseconds. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters.
Recommendations
If autovacuum is having too much of a performance impact on running queries, you might want to increase this setting to 50ms. However, this will also cause individual vacuum tasks to take longer.
On StackOverflow
- What is autovacuum_vacuum_cost_delay in autovacuum in PostgreSQL?
- Postgres auto-vacuum doesn't reclaim the dead tuples space causes disk full issue
- is there any adverse effect on DB if I set autovacuum scale factor to zero for certain tables?
- Need clarification related to Autovacuum configuration parameters
- vacuum_cost_page_miss set to zero