AutovacuumReload, no restartdefault -1
autovacuum_vacuum_cost_limit
Vacuum cost amount available before napping, for autovacuum.
How you change it
Reload, no restart
Defaults and ranges on this page were read from pg_settings on live PostgreSQL 18.4. Treat older majors as needing their own check before you copy a value.
-1 means use "vacuum_cost_limit".
What this means
The accumulated 'cost' an autovacuum worker may spend before it sleeps for autovacuum_vacuum_cost_delay. Together these throttle autovacuum's I/O so it does not overwhelm foreground work. Raising the limit lets vacuum do more work between naps and finish sooner.
When it matters
Raise it when autovacuum cannot keep up with churn and I/O headroom exists.
| Default | -1 |
|---|---|
| Range | -1 – 10000 |
| Type | integer |
| Change scope | Reload, no restart |
| Category | Autovacuum |
Check the current value
SHOW autovacuum_vacuum_cost_limit;Tradeoffs
- • Too low: autovacuum falls behind on busy tables and bloat grows.
- • Too high: vacuum competes harder with foreground queries for I/O.
- • The limit is shared across all workers unless overridden per-table.