Summary
The pg_stat_wal view will always have a single row, containing data about WAL activity of the cluster.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_stat_wal statistics view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
wal_recordsbigint
Total number of WAL records generatedwal_fpibigint
Total number of WAL full page images generatedwal_bytesnumeric
Total amount of WAL generated in byteswal_fpi_bytesnumeric
Total amount of WAL full page images in byteswal_buffers_fullbigint
Number of times WAL data was written to disk because WAL buffers became fullstats_resettimestamp with time zone
Time at which these statistics were last reset
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_stat_wal.