Report pages read from WAL buffers in pg_stat_io.hits Callers of WALReadFromBuffers() read data from the WAL buffers (currently only WAL senders). This commit makes now available the number of pages read from the WAL uffers in pg_stat_io.hits under object "wal" and context "normal".
A read from a WAL file is counted in pg_stat_io.reads and read_bytes. This new information can be useful for the tuning of wal_buffers, where the number of hits matches with the number of pages found as available in the buffers. Note that WALReadFromBuffers() may be called for an amount of data worth less than one WAL page, and that a partial page read is counted as one hit. Author: Bharath Rupireddy <[email protected]> Reviewed-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/calj2acvff2uj9nofy-5m98hntjhpud17ede9twvejng-jta...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/856a6594d86e4a7c0e9490253912af3f6159802f Modified Files -------------- doc/src/sgml/monitoring.sgml | 8 +++++++- src/backend/access/transam/xlog.c | 6 ++++++ src/backend/utils/activity/pgstat_io.c | 9 ++++++--- src/test/recovery/t/001_stream_rep.pl | 9 +++++---- 4 files changed, 24 insertions(+), 8 deletions(-)
