pg_stat_progress_analyze

一个进度报告视图,提供有关ANALYZE命令进度的信息

pg_stat_progress_analyze 是一个 进度报告视图,提供有关 ANALYZE 命令进度的信息。

pg_stat_progress_analyzePostgreSQL 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

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

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

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

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     |           |          |
    

文档: pg_stat_progress_analyze

变更历史

示例

在运行 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

分类

监控, 进度报告视图

参见

ANALYZE, 进度报告

反馈

提交任何关于 "pg_stat_progress_analyze" 的评论、建议或更正 此处.