From ba0e8377be6bc18e60f31cdb977bf8a7f51b9212 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 5 Apr 2023 07:59:52 +0900 Subject: [PATCH] doc: Add more details about pg_stat_get_xact_blocks_{fetched,hit} The explanation describing the dependency to system read() calls for these two functions has been removed in ddfc2d9. And after more discussion about d69c404, we have concluded that adding more details makes them easier to understand. While on it, use the term "block read requests" (maybe found in cache) rather than "buffers fetched" and "buffer hits". Per discussion with Melanie Plageman, Kyotaro Horiguchi, Bertrand Drouvot and myself. Discussion: https://postgr.es/m/CAAKRu_ZmdiScT4q83OAbfmR5AH-L5zWya3SXjaxiJvhCob-e2A@mail.gmail.com Backpatch-through: 11 --- doc/src/sgml/monitoring.sgml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 67aced7e5f..414be8a47e 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -5047,8 +5047,11 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i bigint - Returns the number of buffers fetched for table or index, in the current - transaction. + Returns the number of block read requests for table or index, in the + current transaction. This number minus + pg_stat_get_xact_blocks_hit gives the number of + kernel read() calls; the number of actual + physical reads is usually lower due to kernel-level buffering. @@ -5061,8 +5064,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i bigint - Returns the number of buffer hits for table or index, in the current - transaction. + Returns the number of block read requests for table or index, in the + current transaction, found in cache (not triggering kernel + read() calls).