pgsql: Add pg_stat_wal statistics view.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add pg_stat_wal statistics view.
Date: 2020-10-02 01:19:04
Message-ID: E1kO9iy-00077D-Ov@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8d9a935965f01b7759a8c23ff6291000b670a2bf

Modified Files
--------------
doc/src/sgml/monitoring.sgml | 63 ++++++++++++++++-
src/backend/access/transam/xlog.c | 1 +
src/backend/catalog/system_views.sql | 6 ++
src/backend/postmaster/checkpointer.c | 3 +
src/backend/postmaster/pgstat.c | 120 +++++++++++++++++++++++++++++++--
src/backend/utils/adt/pgstatfuncs.c | 36 ++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 8 +++
src/include/pgstat.h | 33 ++++++++-
src/test/regress/expected/rules.out | 3 +
src/test/regress/expected/sysviews.out | 7 ++
src/test/regress/sql/sysviews.sql | 3 +
src/tools/pgindent/typedefs.list | 2 +
13 files changed, 276 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-10-02 01:37:13 pgsql: doc: Improve some documentation about HA and replication
Previous Message Michael Paquier 2020-10-02 00:41:12 pgsql: Add block information in error context of WAL REDO apply loop