Skip to content

Commit b135a94

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 6e36981 commit b135a94

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
@@ -5319,8 +5319,11 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
53195319
<returnvalue>bigint</returnvalue>
53205320
</para>
53215321
<para>
5322-
Returns the number of buffers fetched for table or index, in the current
5323-
transaction.
5322+
Returns the number of block read requests for table or index, in the
5323+
current transaction. This number minus
5324+
<function>pg_stat_get_xact_blocks_hit</function> gives the number of
5325+
kernel <function>read()</function> calls; the number of actual
5326+
physical reads is usually lower due to kernel-level buffering.
53245327
</para></entry>
53255328
</row>
53265329

@@ -5333,8 +5336,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
53335336
<returnvalue>bigint</returnvalue>
53345337
</para>
53355338
<para>
5336-
Returns the number of buffer hits for table or index, in the current
5337-
transaction.
5339+
Returns the number of block read requests for table or index, in the
5340+
current transaction, found in cache (not triggering kernel
5341+
<function>read()</function> calls).
53385342
</para></entry>
53395343
</row>
53405344

0 commit comments

Comments
 (0)