pg_stat_wal

显示有关 WAL 活动信息的统计视图

pg_stat_wal 是一个显示有关WAL 活动信息的统计视图

pg_stat_walPostgreSQL 14 中添加。

按 PostgreSQL 版本定义

pg_stat_wal (PostgreSQL 17)

                        View "pg_catalog.pg_stat_wal"
      Column      |           Type           | Collation | Nullable | Default 
------------------+--------------------------+-----------+----------+---------
 wal_records      | bigint                   |           |          | 
 wal_fpi          | bigint                   |           |          | 
 wal_bytes        | numeric                  |           |          | 
 wal_buffers_full | bigint                   |           |          | 
 wal_write        | bigint                   |           |          | 
 wal_sync         | bigint                   |           |          | 
 wal_write_time   | double precision         |           |          | 
 wal_sync_time    | double precision         |           |          | 
 stats_reset      | timestamp with time zone |           |          |
    

文档: pg_stat_wal

pg_stat_wal (PostgreSQL 16)

                        View "pg_catalog.pg_stat_wal"
      Column      |           Type           | Collation | Nullable | Default 
------------------+--------------------------+-----------+----------+---------
 wal_records      | bigint                   |           |          | 
 wal_fpi          | bigint                   |           |          | 
 wal_bytes        | numeric                  |           |          | 
 wal_buffers_full | bigint                   |           |          | 
 wal_write        | bigint                   |           |          | 
 wal_sync         | bigint                   |           |          | 
 wal_write_time   | double precision         |           |          | 
 wal_sync_time    | double precision         |           |          | 
 stats_reset      | timestamp with time zone |           |          |
    

文档: pg_stat_wal

pg_stat_wal (PostgreSQL 15)

                        View "pg_catalog.pg_stat_wal"
      Column      |           Type           | Collation | Nullable | Default 
------------------+--------------------------+-----------+----------+---------
 wal_records      | bigint                   |           |          | 
 wal_fpi          | bigint                   |           |          | 
 wal_bytes        | numeric                  |           |          | 
 wal_buffers_full | bigint                   |           |          | 
 wal_write        | bigint                   |           |          | 
 wal_sync         | bigint                   |           |          | 
 wal_write_time   | double precision         |           |          | 
 wal_sync_time    | double precision         |           |          | 
 stats_reset      | timestamp with time zone |           |          |
    

文档: pg_stat_wal

pg_stat_wal (PostgreSQL 14)

                        View "pg_catalog.pg_stat_wal"
      Column      |           Type           | Collation | Nullable | Default 
------------------+--------------------------+-----------+----------+---------
 wal_records      | bigint                   |           |          | 
 wal_fpi          | bigint                   |           |          | 
 wal_bytes        | numeric                  |           |          | 
 wal_buffers_full | bigint                   |           |          | 
 wal_write        | bigint                   |           |          | 
 wal_sync         | bigint                   |           |          | 
 wal_write_time   | double precision         |           |          | 
 wal_sync_time    | double precision         |           |          | 
 stats_reset      | timestamp with time zone |           |          |
    

文档: pg_stat_wal

变更历史

示例

postgres=# SELECT * FROM pg_stat_wal\gx
-[ RECORD 1 ]----+------------------------------
wal_records      | 1387
wal_fpi          | 110
wal_bytes        | 659600
wal_buffers_full | 0
wal_write        | 14
wal_sync         | 0
wal_write_time   | 0
wal_sync_time    | 0
stats_reset      | 2021-03-09 10:06:01.842869+01

分类

统计/监控视图WAL

另请参阅

wal_buffers,track_wal_io_timing

反馈

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