summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2022-12-19 14:43:09 -0500
committerRobert Haas <rhaas@postgresql.org>2022-12-19 14:43:09 -0500
commit10ea0f924a2788f9e701d6213745aaa5ca3efb8a (patch)
tree7b59764577d935ade39514b0c500237acb38a527 /doc/src
parent7122f9d5437789312cb0a7e26e853bb8d2e57add (diff)
Expose some information about backend subxact status.
A new function pg_stat_get_backend_subxact() can be used to get information about the number of subtransactions in the cache of a particular backend and whether that cache has overflowed. This can be useful for tracking down performance problems that can result from overflowed snapshots. Dilip Kumar, reviewed by Zhihong Yu, Nikolay Samokhvalov, Justin Pryzby, Nathan Bossart, Ashutosh Sharma, Julien Rouhaud. Additional design comments from Andres Freund, Tom Lane, Bruce Momjian, and David G. Johnston. Discussion: http://postgr.es/m/CAFiTN-ut0uwkRJDQJeDPXpVyTWD46m3gt3JDToE02hTfONEN=Q@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/monitoring.sgml18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 11a8ebe5ec7..363b183e5f0 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -5674,6 +5674,24 @@ FROM pg_stat_get_backend_idset() AS backendid;
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
+ <primary>pg_stat_get_backend_subxact</primary>
+ </indexterm>
+ <function>pg_stat_get_backend_subxact</function> ( <type>integer</type> )
+ <returnvalue>record</returnvalue>
+ </para>
+ <para>
+ Returns a record of information about the subtransactions of the
+ backend with the specified ID.
+ The fields returned are <parameter>subxact_count</parameter>, which
+ is the number of subtransactions in the backend's subtransaction cache,
+ and <parameter>subxact_overflow</parameter>, which indicates whether
+ the backend's subtransaction cache is overflowed or not.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="func_table_entry"><para role="func_signature">
+ <indexterm>
<primary>pg_stat_get_backend_userid</primary>
</indexterm>
<function>pg_stat_get_backend_userid</function> ( <type>integer</type> )