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
| Column | Type | Description / reference |
|---|---|---|
pid | integer | Process ID of backend. |
datid | oid | OID of the database to which this backend is connected. |
datname | name | Name of the database to which this backend is connected. |
relid | oid | OID of the table being vacuumed. |
phase | text | Current processing phase of vacuum. See Table 27.46. |
heap_blks_total | bigint | Total 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_scanned | bigint | Number 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_vacuumed | bigint | Number 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_count | bigint | Number of completed index vacuum cycles. |
max_dead_tuple_bytes | bigint | Amount of dead tuple data that we can store before needing to perform an index vacuum cycle, based on maintenance_work_mem. |
dead_tuple_bytes | bigint | Amount of dead tuple data collected since the last index vacuum cycle. |
num_dead_item_ids | bigint | Number of dead item identifiers collected since the last index vacuum cycle. |
indexes_total | bigint | Total 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_processed | bigint | Number of indexes processed. This counter only advances when the phase is vacuuming indexes or cleaning up indexes. |
delay_time | double precision | Total 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
| Column | 9.0 | 9.1 | 9.2 | 9.3 | 9.4 | 9.5 | 9.6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pid | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
datid | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
datname | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
relid | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
phase | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
heap_blks_total | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
heap_blks_scanned | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
heap_blks_vacuumed | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
index_vacuum_count | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
max_dead_tuples | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | · | · | · | · |
num_dead_tuples | · | · | · | · | · | · | ● | ● | ● | ● | ● | ● | ● | ● | · | · | · | · |
max_dead_tuple_bytes | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● |
dead_tuple_bytes | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● |
num_dead_item_ids | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● |
indexes_total | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● |
indexes_processed | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● | ● |
delay_time | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● | ● |
mode | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● |
started_by | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | ● | ● |
Version history 11
- PG 19 → 20changed
- PG 18 → 19changed
- PG 17 → 18changed
- PG 16 → 17changed
- PG 15 → 16changed
- PG 14 → 15changed
- PG 13 → 14changed
- PG 12 → 13changed
- PG 11 → 12changed
- PG 9.6 → 10changed
- PG 9.5 → 9.6added
Definition snapshot: english-manuals:a2de7e7096e72a1ee19e9f6f00e… · English manual source