Skip to main content

Running autovacuum workers

When autovacuum workers are active, this section shows real-time progress from pg_stat_progress_vacuum.

Per-worker metrics

FieldDescription
TableTable being vacuumed
PhaseCurrent vacuum phase (scanning heap, vacuuming indexes, etc.)
DurationHow long this worker has been running
Heap scanned %Progress through the heap scan phase
Dead tuplesNumber of dead tuples found so far
Dead % of tableDead tuples as percentage of total tuples
Progress rateHeap scanned % per minute
Severitystuck, slow, or normal

Phase-aware severity

Severity is computed server-side based on the current phase, elapsed time, table size, and observed progress. Exact thresholds are intentionally not documented publicly.

Scanning heap:

  • Stuck: little or no progress after enough time has passed for the table size.
  • Slow: progress is moving, but much slower than expected.

Vacuuming indexes:

  • Stuck detection is handled differently because heap scan percentage does not advance during index vacuum.
  • Slow: index vacuuming has been running long enough to deserve attention.

Other phases (cleanup, truncation, finalization):

  • Slow: cleanup or finalization phases are taking longer than expected.

Unknown phases are logged as warnings to catch new PostgreSQL version behavior.