8000 doc: Add more details about pg_stat_get_xact_blocks_{fetched,hit} · postgres/postgres@ea40625 · GitHub
[go: up one dir, main page]

Skip to content

Commit ea40625

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 e46a309 commit ea40625

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
@@ -3147,17 +3147,21 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
31473147
<entry><literal><function>pg_stat_get_xact_blocks_fetched</function>(oid)</literal><indexterm><primary>pg_stat_get_xact_blocks_fetched</primary></indexterm></entry>
31483148
<entry><type>bigint</type></entry>
31493149
<entry>
3150-
Returns the number of buffers fetched for table or index, in the current
3151-
transaction.
3150+
Returns the number of block read requests for table or index, in the
3151+
current transaction. This number minus
3152+
<function>pg_stat_get_xact_blocks_hit</function> gives the number of
3153+
kernel <function>read()</function> calls; the number of actual
3154+
physical reads is usually lower due to kernel-level buffering.
31523155
</entry>
31533156
</row>
31543157

31553158
<row>
31563159
<entry><literal><function>pg_stat_get_xact_blocks_hit</function>(oid)</literal><indexterm><primary>pg_stat_get_xact_blocks_hit</primary></indexterm></entry>
31573160
<entry><type>bigint</type></entry>
31583161
<entry>
3159-
Returns the number of buffer hits for table or index, in the current
3160-
transaction.
3162+
Returns the number of block read requests for table or index, in the
3163+
current transaction, found in cache (not triggering kernel
3164+
<function>read()</function> calls).
31613165
</entry>
31623166
</row>
31633167

0 commit comments

Comments
 (0)
0