Skip to content

Commit f7a057a

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 bfb993b commit f7a057a

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
@@ -4615,8 +4615,11 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
46154615
<returnvalue>bigint</returnvalue>
46164616
</para>
46174617
<para>
4618-
Returns the number of buffers fetched for table or index, in the current
4619-
transaction.
4618+
Returns the number of block read requests for table or index, in the
4619+
current transaction. This number minus
4620+
<function>pg_stat_get_xact_blocks_hit</function> gives the number of
4621+
kernel <function>read()</function> calls; the number of actual
4622+
physical reads is usually lower due to kernel-level buffering.
46204623
</para></entry>
46214624
</row>
46224625

@@ -4629,8 +4632,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
46294632
<returnvalue>bigint</returnvalue>
46304633
</para>
46314634
<para>
4632-
Returns the number of buffer hits for table or index, in the current
4633-
transaction.
4635+
Returns the number of block read requests for table or index, in the
4636+
current transaction, found in cache (not triggering kernel
4637+
<function>read()</function> calls).
46344638
</para></entry>
46354639
</row>
46364640

0 commit comments

Comments
 (0)