pg_stat_wal

A statistics view showing information about WAL activity
This entry relates to a PostgreSQL feature which is part of PostgreSQL 14, due to be released in late 2021.

pg_stat_wal is a statistics view showing information about WAL activity.

pg_stat_wal was added in PostgreSQL 14.

Definition by PostgreSQL version

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

Documentation: pg_stat_wal

Change history

Examples

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

Categories

Statistics / monitoring view, WAL

See also

wal_buffers, track_wal_io_timing