select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SYSTEM CATALOGS / PROGRESS REPORTING

pg_stat_progress_vacuum

Read PG 18 manual ↗

Whenever VACUUM is running, the pg_stat_progress_vacuum view will contain one row for each backend (including autovacuum worker processes) that is currently vacuuming.

Kind
Progress reporting
Columns in this snapshot
15
Definition source
English manual

Columns 15

ColumnTypeDescription / reference
pidintegerProcess ID of backend.
datidoidOID of the database to which this backend is connected.
datnamenameName of the database to which this backend is connected.
relidoidOID of the table being vacuumed.
phasetextCurrent processing phase of vacuum. See Table 27.46.
heap_blks_totalbigintTotal number of heap blocks in the table. This number is reported as of the beginning of the scan; blocks added later will not be (and need not be) visited by this VACUUM.
heap_blks_scannedbigintNumber of heap blocks scanned. Because the visibility map is used to optimize scans, some blocks will be skipped without inspection; skipped blocks are included in this total, so that this number will eventually become equal to heap_blks_total when the vacuum is complete. This counter only advances when the phase is scanning heap.
heap_blks_vacuumedbigintNumber of heap blocks vacuumed. Unless the table has no indexes, this counter only advances when the phase is vacuuming heap. Blocks that contain no dead tuples are skipped, so the counter may sometimes skip forward in large increments.
index_vacuum_countbigintNumber of completed index vacuum cycles.
max_dead_tuple_bytesbigintAmount of dead tuple data that we can store before needing to perform an index vacuum cycle, based on maintenance_work_mem.
dead_tuple_bytesbigintAmount of dead tuple data collected since the last index vacuum cycle.
num_dead_item_idsbigintNumber of dead item identifiers collected since the last index vacuum cycle.
indexes_totalbigintTotal number of indexes that will be vacuumed or cleaned up. This number is reported at the beginning of the vacuuming indexes phase or the cleaning up indexes phase.
indexes_processedbigintNumber of indexes processed. This counter only advances when the phase is vacuuming indexes or cleaning up indexes.
delay_timedouble precisionTotal time spent sleeping due to cost-based delay (see Section 19.10.2), in milliseconds (if track_cost_delay_timing is enabled, otherwise zero). This includes the time that any associated parallel workers have slept. However, parallel workers report their sleep time no more frequently than once per second, so the reported value may be slightly stale.
Column history across versions
Version history 11
  1. PG 19 → 20changed
  2. PG 18 → 19changed
  3. PG 17 → 18changed
  4. PG 16 → 17changed
  5. PG 15 → 16changed
  6. PG 14 → 15changed
  7. PG 13 → 14changed
  8. PG 12 → 13changed
  9. PG 11 → 12changed
  10. PG 9.6 → 10changed
  11. PG 9.5 → 9.6added

Definition snapshot: english-manuals:a2de7e7096e72a1ee19e9f6f00e… · English manual source