From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Track shared buffer hits in pg_stat_io |
Date: | 2023-03-31 02:38:23 |
Message-ID: | E1pi4ek-000ZSI-HB@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-03-31 02:49:18 | pgsql: Bump PGSTAT_FILE_FORMAT_ID, omitted in 8aaa04b32d7 |
Previous Message | David Rowley | 2023-03-30 23:16:01 | pgsql: Fix List memory issue in transformColumnDefinition |