pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Track shared buffer hits in pg_stat_io
Date: Fri, 31 Mar 2023 02:38:23 +0000
Message-ID: <E1pi4ek-000ZSI-HB@gemulon.postgresql.org> (raw )
Track shared buffer hits in pg_stat_io
Among other things, this should make it easier to calculate a useful cache hit
ratio by excluding buffer reads via buffer access strategies. As buffer access
strategies reuse buffers (and thus evict the prior buffer contents), it is
normal to see reads on repeated scans of the same data.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CAAKRu_beMa9Hzih40%3DXPYqhDVz6tsgUGTrhZXRo%3Dunp%2Bszb%3DUA%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8aaa04b32d790da595684de58ae4fc2db96becff
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 11 ++++++++
src/backend/catalog/system_views.sql | 1 +
src/backend/storage/buffer/bufmgr.c | 38 +++++++++++-----------------
src/backend/storage/buffer/localbuf.c | 11 ++------
src/backend/utils/activity/pgstat_io.c | 2 +-
src/backend/utils/adt/pgstatfuncs.c | 11 +++++---
src/include/catalog/pg_proc.dat | 6 ++---
src/include/pgstat.h | 1 +
src/include/storage/buf_internals.h | 2 +-
src/test/regress/expected/rules.out | 3 ++-
src/test/regress/expected/stats.out | 46 ++++++++++++++++++++++++++++++++--
src/test/regress/sql/stats.sql | 24 ++++++++++++++++--
12 files changed, 109 insertions(+), 47 deletions(-)
Message-ID: <E1pi4ek-000ZSI-HB@gemulon.postgresql.org>
Permalink: ../E1pi4ek-000ZSI-HB@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1pi4ek-000ZSI-HB@gemulon.postgresql.org
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Track shared buffer hits in pg_stat_io
In-Reply-To: <E1pi4ek-000ZSI-HB@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox