pg_stat_progress_analyze

A progress reporting view providing information on the progress of ANALYZE commands

pg_stat_progress_analyze is a progress reporting view providing information on the progress of ANALYZE commands.

pg_stat_progress_analyze was added in PostgreSQL 13.

Definition by PostgreSQL version

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

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

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

Documentation: pg_stat_progress_analyze

Change history

Examples

Example output during a running ANALYZE operation:

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

Categories

Monitoring, Progress reporting view

See also

ANALYZE, Progress reporting