PROGRESS REPORT进度视图
pg_stat_progress_cluster
每个正在运行CLUSTER或VACUUM FULL的后端一行,显示当前进度。请参阅Section 27.4.4。
进度视图 引入 12 现存至 20 devel 0 次结构变更
版本轨迹
相对 PostgreSQL 17 无变化。
每当CLUSTER或VACUUM FULL运行时,pg_stat_progress_cluster视图将包含当前正在运行的每一个后台的记录。下面的表格描述了将被报告的信息,并提供了关于如何解释这些信息的信息。
字段
PostgreSQL 18 的 12 个字段,按定义顺序排列。说明默认用本站手册的译文,没有译文的按英文原文显示。
| 字段 | 类型 | 说明 |
|---|---|---|
pid
|
integer
|
后端的进程ID。 |
datid
|
oid
|
后端连接到的数据库的OID。 |
datname
|
name
|
后端连接到的数据库的名称。 |
relid
|
oid
|
被集群的表的OID。 |
command
|
text
|
正在运行的命令。CLUSTER或VACUUM FULL。 |
phase
|
text
|
当前处理阶段。参见Table 27.45。 |
cluster_index_relid
|
oid
|
如果正在使用索引对表进行扫描,这就是正在使用的索引的OID;否则为0。 |
heap_tuples_scanned
|
bigint
|
扫描的堆元组数。 该计数器仅在阶段为seq scanning heap、index scanning heap 或 writing new heap 时才会递增。 |
heap_tuples_written
|
bigint
|
写入的堆元组的数量。这个计数器只有在阶段为seq scanning heap,index scanning heap 或 writing new heap时才会前进。 |
heap_blks_total
|
bigint
|
表中的堆块总数。 这个数字是在seq scanning heap的开始时报告的。 |
heap_blks_scanned
|
bigint
|
扫描的堆块数量。该计数器仅在阶段为seq scanning heap时才会递增。 |
index_rebuild_count
|
bigint
|
已重建的索引数。该计数器仅在重建索引阶段时才会递增。 |
演化历史
相邻两个大版本之间的差异,新的在前。版本号链到该版的字段表。
-
PostgreSQL 19 ← 18 仅描述更新
关系说明更新
2 处描述更新
commandThe command that is running. Either CLUSTER or VACUUM FULL. The command that is running. Either CLUSTER or VACUUM FULL. Because this view exists for backwards-compatibility purposes only, it will translate any REPACK command into one of these other two.phaseCurrent processing phase. See Table 27.41. Current processing phase. See Table 27.44.
-
PostgreSQL 17 ← 16 仅描述更新
1 处描述更新
phaseCurrent processing phase. See Table 28.40. Current processing phase. See Table 27.41.
-
PostgreSQL 16 ← 15 仅描述更新
1 处描述更新
phaseCurrent processing phase. See Table 28.43. Current processing phase. See Table 28.40.
-
PostgreSQL 15 ← 14 仅描述更新
1 处描述更新
phaseCurrent processing phase. See Table 28.41. Current processing phase. See Table 28.43.
-
PostgreSQL 14 ← 13 仅描述更新
1 处描述更新
phaseCurrent processing phase. See Table 27.39. Current processing phase. See Table 28.41.
-
PostgreSQL 13 ← 12 仅描述更新
1 处描述更新
phaseCurrent processing phase. See Table 27.27. Current processing phase. See Table 27.39.
-
PostgreSQL 12 ← 11 新增此关系
共 12 个字段
字段矩阵
每个字段在 9 个收录版本里的存在情况;方格指向该版的字段表。「有变」指类型、可空、隐式或数组维数与上一版不同。
存在 有变 已移除 不存在
| 字段 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|
pid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
datid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
datname |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
relid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
command |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
phase |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
cluster_index_relid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
heap_tuples_scanned |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
heap_tuples_written |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
heap_blks_total |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
heap_blks_scanned |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
index_rebuild_count |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
同类关系
| 关系 | 引入 | 字段 | 版本变动 | 最近变更 |
|---|---|---|---|---|
pg_stat_progress_analyze |
13 | 14 | 192 次 | |
| 每个正在运行ANALYZE的后端(包括自动清理工作进程)一行,显示当前进度。请参阅Section 27.4.1。 | 现存 | |||
pg_stat_progress_basebackup |
13 | 7 | 191 次 | |
| 每个正在流式传输基础备份的 WAL 发送进程一行,显示当前进度。请参阅Section 27.4.5。 | 现存 | |||
pg_stat_progress_cluster |
12 | 12 | — | |
| 每个正在运行CLUSTER或VACUUM FULL的后端一行,显示当前进度。请参阅Section 27.4.4。 | 现存 | |||
pg_stat_progress_copy |
14 | 11 | 171 次 | |
| 每个正在运行COPY的后端一行,显示当前进度。请参阅Section 27.4.6。 | 现存 | |||
pg_stat_progress_create_index |
12 | 16 | — | |
| 每个正在运行CREATE INDEX或REINDEX的后端一行,显示当前进度。请参阅Section 27.4.2。 | 现存 | |||
pg_stat_progress_data_checksums |
19 | 10 | — | |
| 启用或禁用数据校验和时,数据校验和启动器进程占一行。启用数据校验和时, 该视图还会为每个工作进程提供一行,显示当前进度。 详见Section 27.4.8。 | 现存 | |||
pg_stat_progress_repack |
19 | 14 | — | |
| 每个正在运行REPACK、CLUSTER或VACUUM FULL的后端一行,显示当前进度。请参阅Section 27.4.3。 | 现存 | |||
pg_stat_progress_vacuum |
9.6 | 17 | 193 次 | |
| 每个正在运行VACUUM的后端(包括自动清理工作进程)一行,显示当前进度。请参阅Section 27.4.3。 | 现存 | |||