PROGRESS REPORT进度视图
pg_stat_progress_create_index
每个正在运行CREATE INDEX或REINDEX的后端一行,显示当前进度。请参阅Section 27.4.2。
进度视图 引入 12 现存至 20 devel 0 次结构变更
版本轨迹
相对 PostgreSQL 17 无变化。
每当运行CREATE INDEX或REINDEX时,pg_stat_progress_create_index视图将包含当前正在创建索引的每个后端的一行。 下面的表描述了将要报告的信息,并提供了关于如何解释它的信息。
字段
PostgreSQL 18 的 16 个字段,按定义顺序排列。说明默认用本站手册的译文,没有译文的按英文原文显示。
| 字段 | 类型 | 说明 |
|---|---|---|
pid
|
integer
|
后端的进程ID。 |
datid
|
oid
|
后端连接到的数据库的OID。 |
datname
|
name
|
后端连接到的数据库的名称。 |
relid
|
oid
|
正在创建索引的表的OID。 |
index_relid
|
oid
|
正在创建或重建索引的OID。在非并发 CREATE INDEX的时候,此为 0。 |
command
|
text
|
在运行的命令: CREATE INDEX,CREATE INDEX CONCURRENTLY, REINDEX, 或 REINDEX CONCURRENTLY. |
phase
|
text
|
索引创建的当前处理阶段。 参见 Table 27.41。 |
lockers_total
|
bigint
|
在适用的情况下,需要等待的储物柜总数 |
lockers_done
|
bigint
|
已经等待的储物柜数量。 |
current_locker_pid
|
bigint
|
目前正在等待的储物柜的进程ID。 |
blocks_total
|
bigint
|
本阶段要处理的区块总数。 |
blocks_done
|
bigint
|
当前阶段已经处理的区块数量。 |
tuples_total
|
bigint
|
当前阶段要处理的元组总数。 |
tuples_done
|
bigint
|
在当前阶段已经处理的元组数量。 |
partitions_total
|
bigint
|
在分区表上创建索引时,该列被设置为要在其上创建索引的分区总数。 在REINDEX期间,此字段为0。 |
partitions_done
|
bigint
|
当在分区表上创建索引时,该列被设置为在其上建立索引的分区数。 在REINDEX期间,此字段为0。 |
演化历史
相邻两个大版本之间的差异,新的在前。版本号链到该版的字段表。
-
PostgreSQL 19 ← 18 仅描述更新
1 处描述更新
phaseCurrent processing phase of index creation. See Table 27.44. Current processing phase of index creation. See Table 27.47.
-
PostgreSQL 17 ← 16 仅描述更新
1 处描述更新
phaseCurrent processing phase of index creation. See Table 28.43. Current processing phase of index creation. See Table 27.44.
-
PostgreSQL 16 ← 15 仅描述更新
5 处描述更新
commandThe command that is running: CREATE INDEX, CREATE INDEX CONCURRENTLY, REINDEX, or REINDEX CONCURRENTLY. Specific command type: CREATE INDEX, CREATE INDEX CONCURRENTLY, REINDEX, or REINDEX CONCURRENTLY.partitions_doneWhen creating an index on a partitioned table, this column is set to the number of partitions on which the index has been created. This field is 0 during a REINDEX. Number of partitions on which the index has already been created or attached, including both direct and indirect partitions. 0 during a REINDEX, or when the index is not partitioned.partitions_totalWhen creating an index on a partitioned table, this column is set to the total number of partitions on which the index is to be created. This field is 0 during a REINDEX. Total number of partitions on which the index is to be created or attached, including both direct and indirect partitions. 0 during a REINDEX, or when the index is not partitioned.phaseCurrent processing phase of index creation. See Table 28.39. Current processing phase of index creation. See Table 28.43.pidProcess ID of backend. Process ID of the backend creating indexes.
-
PostgreSQL 15 ← 14 仅描述更新
1 处描述更新
phaseCurrent processing phase of index creation. See Table 28.37. Current processing phase of index creation. See Table 28.39.
-
PostgreSQL 14 ← 13 仅描述更新
3 处描述更新
partitions_doneWhen creating an index on a partitioned table, this column is set to the number of partitions on which the index has been completed. When creating an index on a partitioned table, this column is set to the number of partitions on which the index has been created. This field is 0 during a REINDEX.partitions_totalWhen creating an index on a partitioned table, this column is set to the total number of partitions on which the index is to be created. When creating an index on a partitioned table, this column is set to the total number of partitions on which the index is to be created. This field is 0 during a REINDEX.phaseCurrent processing phase of index creation. See Table 27.35. Current processing phase of index creation. See Table 28.37.
-
PostgreSQL 13 ← 12 仅描述更新
1 处描述更新
phaseCurrent processing phase of index creation. See Table 27.23. Current processing phase of index creation. See Table 27.35.
-
PostgreSQL 12 ← 11 新增此关系
共 16 个字段
字段矩阵
每个字段在 9 个收录版本里的存在情况;方格指向该版的字段表。「有变」指类型、可空、隐式或数组维数与上一版不同。
存在 有变 已移除 不存在
| 字段 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|
pid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
datid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
datname |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
relid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
index_relid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
command |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
phase |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
lockers_total |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
lockers_done |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
current_locker_pid |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
blocks_total |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
blocks_done |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
tuples_total |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
tuples_done |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
partitions_total |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
partitions_done |
存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 | 存在 |
同类关系
| 关系 | 引入 | 字段 | 版本变动 | 最近变更 |
|---|---|---|---|---|
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。 | 现存 | |||