From 10ea0f924a2788f9e701d6213745aaa5ca3efb8a Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 19 Dec 2022 14:43:09 -0500 Subject: 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 --- doc/src/sgml/monitoring.sgml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/src') 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 @@ -5671,6 +5671,24 @@ FROM pg_stat_get_backend_idset() AS backendid; + + + + pg_stat_get_backend_subxact + + pg_stat_get_backend_subxact ( integer ) + record + + + Returns a record of information about the subtransactions of the + backend with the specified ID. + The fields returned are subxact_count, which + is the number of subtransactions in the backend's subtransaction cache, + and subxact_overflow, which indicates whether + the backend's subtransaction cache is overflowed or not. + + + -- cgit v1.2.3