pg_stat_progress_analyze
是一个 进度报告视图,提供有关 ANALYZE
命令进度的信息。
pg_stat_progress_analyze
在 PostgreSQL 13 中添加。
按PostgreSQL版本定义
pg_stat_progress_analyze (PostgreSQL 17)
View "pg_catalog.pg_stat_progress_analyze" Column | Type | Collation | Nullable | Default ---------------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | phase | text | | | sample_blks_total | bigint | | | sample_blks_scanned | bigint | | | ext_stats_total | bigint | | | ext_stats_computed | bigint | | | child_tables_total | bigint | | | child_tables_done | bigint | | | current_child_table_relid | oid | | |
pg_stat_progress_analyze (PostgreSQL 16)
View "pg_catalog.pg_stat_progress_analyze" Column | Type | Collation | Nullable | Default ---------------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | phase | text | | | sample_blks_total | bigint | | | sample_blks_scanned | bigint | | | ext_stats_total | bigint | | | ext_stats_computed | bigint | | | child_tables_total | bigint | | | child_tables_done | bigint | | | current_child_table_relid | oid | | |
pg_stat_progress_analyze (PostgreSQL 15)
View "pg_catalog.pg_stat_progress_analyze" Column | Type | Collation | Nullable | Default ---------------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | phase | text | | | sample_blks_total | bigint | | | sample_blks_scanned | bigint | | | ext_stats_total | bigint | | | ext_stats_computed | bigint | | | child_tables_total | bigint | | | child_tables_done | bigint | | | current_child_table_relid | oid | | |
pg_stat_progress_analyze (PostgreSQL 14)
View "pg_catalog.pg_stat_progress_analyze" Column | Type | Collation | Nullable | Default ---------------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | phase | text | | | sample_blks_total | bigint | | | sample_blks_scanned | bigint | | | ext_stats_total | bigint | | | ext_stats_computed | bigint | | | child_tables_total | bigint | | | child_tables_done | bigint | | | current_child_table_relid | oid | | |
pg_stat_progress_analyze (PostgreSQL 13)
View "pg_catalog.pg_stat_progress_analyze" Column | Type | Collation | Nullable | Default ---------------------------+---------+-----------+----------+--------- pid | integer | | | datid | oid | | | datname | name | | | relid | oid | | | phase | text | | | sample_blks_total | bigint | | | sample_blks_scanned | bigint | | | ext_stats_total | bigint | | | ext_stats_computed | bigint | | | child_tables_total | bigint | | | child_tables_done | bigint | | | current_child_table_relid | oid | | |
变更历史
- PostgreSQL 13
- 添加 (提交 a166d408)
示例
在运行 ANALYZE 操作期间的 pg_stat_progress_analyze
输出示例
postgres=# SELECT * FROM pg_stat_progress_analyze; -[ RECORD 1 ]-------------+---------------------- pid | 29956 datid | 12692 datname | postgres relid | 16384 phase | acquiring sample rows sample_blks_total | 30000 sample_blks_scanned | 12544 ext_stats_total | 0 ext_stats_computed | 0 child_tables_total | 0 child_tables_done | 0 current_child_table_relid | 0
参考文献
- PostgreSQL 文档: ANALYZE 进度报告