Skip to content

Commit e126d81

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 36320cb commit e126d81

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
@@ -5735,8 +5735,11 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
57355735
<returnvalue>bigint</returnvalue>
57365736
</para>
57375737
<para>
5738-
Returns the number of buffers fetched for table or index, in the current
5739-
transaction.
5738+
Returns the number of block read requests for table or index, in the
5739+
current transaction. This number minus
5740+
<function>pg_stat_get_xact_blocks_hit</function> gives the number of
5741+
kernel <function>read()</function> calls; the number of actual
5742+
physical reads is usually lower due to kernel-level buffering.
57405743
</para></entry>
57415744
</row>
57425745

@@ -5749,8 +5752,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
57495752
<returnvalue>bigint</returnvalue>
57505753
</para>
57515754
<para>
5752-
Returns the number of buffer hits for table or index, in the current
5753-
transaction.
5755+
Returns the number of block read requests for table or index, in the
5756+
current transaction, found in cache (not triggering kernel
5757+
<function>read()</function> calls).
57545758
</para></entry>
57555759
</row>
57565760

0 commit comments

Comments
 (0)