Expose some information about backend subxact status.
Robert Haas <rhaas@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +18 −0 |
| src/backend/storage/ipc/sinvaladt.c | modified | +9 −4 |
| src/backend/utils/activity/backend_status.c | modified | +3 −1 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +38 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +7 −0 |
| src/include/storage/sinvaladt.h | modified | +3 −1 |
| src/include/utils/backend_status.h | modified | +11 −0 |
Documentation touched
Discussion
- Add sub-transaction overflow status in pg_stat_activity 66 messages · 2021-12-07 → 2023-02-08