Skip to content

Commit ba0e837

Browse files
committed
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
1 parent b0b55d8 commit ba0e837

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/src/sgml/monitoring.sgml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5047,8 +5047,11 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
50475047
<returnvalue>bigint</returnvalue>
50485048
</para>
50495049
<para>
5050-
Returns the number of buffers fetched for table or index, in the current
5051-
transaction.
5050+
Returns the number of block read requests for table or index, in the
5051+
current transaction. This number minus
5052+
<function>pg_stat_get_xact_blocks_hit</function> gives the number of
5053+
kernel <function>read()</function> calls; the number of actual
5054+
physical reads is usually lower due to kernel-level buffering.
50525055
</para></entry>
50535056
</row>
50545057

@@ -5061,8 +5064,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
50615064
<returnvalue>bigint</returnvalue>
50625065
</para>
50635066
<para>
5064-
Returns the number of buffer hits for table or index, in the current
5065-
transaction.
5067+
Returns the number of block read requests for table or index, in the
5068+
current transaction, found in cache (not triggering kernel
5069+
<function>read()</function> calls).
50665070
</para></entry>
50675071
</row>
50685072

0 commit comments

Comments
 (0)