跳转到主要内容
← 目录图谱 / pg_stat_progress_vacuum

PROGRESS REPORT · 进度报告

pg_stat_progress_vacuum

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. The tables below describe the information that will be reported and provide information about how to interpret it. Progress for VACUUM FULL commands is reported via pg_stat_progress_cluster because both VACUUM FULL and CLUSTER rewrite the table, while regular VACUUM only modifies it in place. See Section 27.4.2.

首次收录 PG 9.6最近收录 PG 19当前字段 15

已与 PostgreSQL 18.6 实例逐字段核对 · 原始实测记录 ↗

字段结构 PostgreSQL 18

pg_stat_progress_vacuum
字段 / COLUMN类型 / TYPE说明 / DESCRIPTION
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.

标记“隐式列”的字段不包含在 SELECT * 中;部分早期统计视图由同版本源码补全,额外来源会显示在字段说明中。

字段演化矩阵

悬停查看字段类型
存在新增 / 类型或属性变化移除
字段 / COLUMN9.09.19.29.39.49.59.610111213141516171819
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

9.0 是收录基线;基线中已存在的字段不标记为新增。矩阵按字段名称对齐,重命名显示为旧字段移除与新字段新增。

演化时间线

相邻大版本的变化

PostgreSQL 19 ← 18

+ mode+ started_by1 处字段说明更新

PostgreSQL 18 ← 17

+ delay_time

PostgreSQL 17 ← 16

+ max_dead_tuple_bytes+ dead_tuple_bytes+ num_dead_item_ids+ indexes_total+ indexes_processed− max_dead_tuples− num_dead_tuples1 处字段说明更新目录说明更新

PostgreSQL 16 ← 15

1 处字段说明更新目录说明更新

PostgreSQL 15 ← 14

1 处字段说明更新

PostgreSQL 14 ← 13

1 处字段说明更新目录说明更新

PostgreSQL 13 ← 12

1 处字段说明更新目录说明更新

PostgreSQL 12 ← 11

1 处字段说明更新目录说明更新

PostgreSQL 10 ← 9.6

1 处字段说明更新

PostgreSQL 9.6 ← 9.5新增目录

+ pid+ datid+ datname+ relid+ phase+ heap_blks_total+ heap_blks_scanned+ heap_blks_vacuumed+ index_vacuum_count+ max_dead_tuples+ num_dead_tuples

比较任意两个版本

选择两个版本,查看字段的新增、移除与类型变化。交互比较需要 JavaScript;演化时间线可直接阅读。