Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
doc: Add description of some missing monitoring functions
authorMichael Paquier <michael@paquier.xyz>
Wed, 22 Mar 2023 09:32:11 +0000 (18:32 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 22 Mar 2023 09:32:11 +0000 (18:32 +0900)
This commit adds some documentation about two monitoring functions:
- pg_stat_get_xact_blocks_fetched()
- pg_stat_get_xact_blocks_hit()

The description of these functions has been removed in ddfc2d9, later
simplified by 5f2b089, assuming that all the functions whose
descriptions were removed are used in system views.  Unfortunately, some
of them were are not used in any system views, so they lacked
documentation.

This gap exists in the docs for a long time, so backpatch all the way
down.

Reported-by: Michael Paquier
Author: Bertrand Drouvot
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/ZBeeH5UoNkTPrwHO@paquier.xyz
Backpatch-through: 11

doc/src/sgml/monitoring.sgml

index d8b20844a97d7f5e4535366fe7433725acad22b2..194b63dddbf4cf2d7ff7d5f398a62e460d174280 100644 (file)
@@ -3142,6 +3142,24 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        Discard the current statistics snapshot
       </entry>
      </row>
+     
+     <row>
+      <entry><literal><function>pg_stat_get_xact_blocks_fetched</function>(oid)</literal><indexterm><primary>pg_stat_get_xact_blocks_fetched</primary></indexterm></entry>
+      <entry><type>bigint</type></entry>
+      <entry>
+       Returns the number of buffers fetched for table or index, in the current
+       transaction.
+      </entry>
+     </row>
+
+     <row>
+      <entry><literal><function>pg_stat_get_xact_blocks_hit</function>(oid)</literal><indexterm><primary>pg_stat_get_xact_blocks_hit</primary></indexterm></entry>
+      <entry><type>bigint</type></entry>
+      <entry>
+       Returns the number of buffer hits for table or index, in the current
+       transaction.
+      </entry>
+     </row>
 
      <row>
       <entry><literal><function>pg_stat_reset()</function></literal><indexterm><primary>pg_stat_reset</primary></indexterm></entry>