pg_stat_progress_cluster
是一个 进度报告视图,提供有关 CLUSTER
和 VACUUM FULL
命令进度的信息。
pg_stat_progress_cluster
在 PostgreSQL 12 中添加。
此视图(而不是 pg_stat_progress_vacuum
)报告 VACUUM FULL
的进度,因为 CLUSTER
和 VACUUM FULL
都涉及表重写。
按 PostgreSQL 版本定义
pg_stat_progress_cluster (PostgreSQL 17)
View "pg_catalog.pg_stat_progress_cluster" Column | Type | Collation | Nullable | Default ---------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | command | text | | | phase | text | | | cluster_index_relid | oid | | | heap_tuples_scanned | bigint | | | heap_tuples_written | bigint | | | heap_blks_total | bigint | | | heap_blks_scanned | bigint | | | index_rebuild_count | bigint | | |
pg_stat_progress_cluster (PostgreSQL 16)
View "pg_catalog.pg_stat_progress_cluster" Column | Type | Collation | Nullable | Default ---------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | command | text | | | phase | text | | | cluster_index_relid | oid | | | heap_tuples_scanned | bigint | | | heap_tuples_written | bigint | | | heap_blks_total | bigint | | | heap_blks_scanned | bigint | | | index_rebuild_count | bigint | | |
pg_stat_progress_cluster (PostgreSQL 15)
View "pg_catalog.pg_stat_progress_cluster" Column | Type | Collation | Nullable | Default ---------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | command | text | | | phase | text | | | cluster_index_relid | oid | | | heap_tuples_scanned | bigint | | | heap_tuples_written | bigint | | | heap_blks_total | bigint | | | heap_blks_scanned | bigint | | | index_rebuild_count | bigint | | |
pg_stat_progress_cluster (PostgreSQL 14)
View "pg_catalog.pg_stat_progress_cluster" Column | Type | Collation | Nullable | Default ---------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | command | text | | | phase | text | | | cluster_index_relid | oid | | | heap_tuples_scanned | bigint | | | heap_tuples_written | bigint | | | heap_blks_total | bigint | | | heap_blks_scanned | bigint | | | index_rebuild_count | bigint | | |
pg_stat_progress_cluster (PostgreSQL 13)
View "pg_catalog.pg_stat_progress_cluster" Column | Type | Collation | Nullable | Default ---------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | command | text | | | phase | text | | | cluster_index_relid | oid | | | heap_tuples_scanned | bigint | | | heap_tuples_written | bigint | | | heap_blks_total | bigint | | | heap_blks_scanned | bigint | | | index_rebuild_count | bigint | | |
pg_stat_progress_cluster (PostgreSQL 12)
View "pg_catalog.pg_stat_progress_cluster" Column | Type | Collation | Nullable | Default ---------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | command | text | | | phase | text | | | cluster_index_relid | oid | | | heap_tuples_scanned | bigint | | | heap_tuples_written | bigint | | | heap_blks_total | bigint | | | heap_blks_scanned | bigint | | | index_rebuild_count | bigint | | |
更改历史记录
- PostgreSQL 12
- 添加 (提交 6f97457e)
参考文献
- PostgreSQL 文档: CLUSTER 进度报告