PostgreSQL

Autovacuum worker starvation delays vacuum on high-churn tables

warning
Resource ContentionUpdated Feb 26, 2026
Technologies:
How to detect:

With only 3 default autovacuum workers and dozens of tables needing vacuum, workers process tables sequentially. High-churn tables may wait minutes or hours for their turn while all workers are busy, accumulating bloat during the wait. When all 3 workers are frequently busy simultaneously, tables are queuing for vacuum.

Recommended action:

Increase autovacuum_max_workers to 5 or more in postgresql.conf (requires restart). Monitor worker utilization with: SELECT count(*) FROM pg_stat_activity WHERE query LIKE 'autovacuum:%'. If count frequently equals autovacuum_max_workers, you need more workers. Also set per-table cost_limit to give each worker an independent I/O budget rather than sharing the global limit.