Add pg_stat_wal statistics view.
Fujii Masao <fujii@postgresql.org>
Add pg_stat_wal statistics view. This view shows the statistics about WAL activity. Currently it has only two columns: wal_buffers_full and stats_reset. wal_buffers_full column indicates the number of times WAL data was written to the disk because WAL buffers got full. This information is useful when tuning wal_buffers. stats_reset column indicates the time at which these statistics were last reset. pg_stat_wal view is also the basic infrastructure to expose other various statistics about WAL activity later. Bump PGSTAT_FILE_FORMAT_ID due to the change in pgstat format. Bump catalog version. Author: Masahiro Ikeda Reviewed-by: Takayuki Tsunakawa, Kyotaro Horiguchi, Amit Kapila, Fujii Masao Discussion: https://postgr.es/m/188bd3f2d2233cf97753b5ced02bb050@oss.nttdata.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +61 −2 |
| src/backend/access/transam/xlog.c | modified | +1 −0 |
| src/backend/catalog/system_views.sql | modified | +6 −0 |
| src/backend/postmaster/checkpointer.c | modified | +3 −0 |
| src/backend/postmaster/pgstat.c | modified | +114 −6 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +36 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +8 −0 |
| src/include/pgstat.h | modified | +31 −2 |
| src/test/regress/expected/rules.out | modified | +3 −0 |
| src/test/regress/expected/sysviews.out | modified | +7 −0 |
| src/test/regress/sql/sysviews.sql | modified | +3 −0 |
| src/tools/pgindent/typedefs.list | modified | +2 −0 |
Documentation touched
Discussion
- New statistics for tuning WAL buffer size 57 messages · 2020-08-18 → 2020-10-16