From 8aaa04b32d790da595684de58ae4fc2db96becff Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Thu, 30 Mar 2023 19:22:40 -0700 Subject: 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 Reviewed-by: Bertrand Drouvot Reviewed-by: Andres Freund Discussion: https://postgr.es/m/CAAKRu_beMa9Hzih40%3DXPYqhDVz6tsgUGTrhZXRo%3Dunp%2Bszb%3DUA%40mail.gmail.com --- doc/src/sgml/monitoring.sgml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index c809ff1ba4a..d5a45f996d0 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3855,6 +3855,17 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i + + + + hits bigint + + + The number of times a desired block was found in a shared buffer. + + + + -- cgit v1.2.3