Track statistics for spilling of changes from ReorderBuffer.
Amit Kapila <akapila@postgresql.org>
Track statistics for spilling of changes from ReorderBuffer. This adds the statistics about transactions spilled to disk from ReorderBuffer. Users can query the pg_stat_replication_slots view to check these stats and call pg_stat_reset_replication_slot to reset the stats of a particular slot. Users can pass NULL in pg_stat_reset_replication_slot to reset stats of all the slots. This commit extends the statistics collector to track this information about slots. Author: Sawada Masahiko and Amit Kapila Reviewed-by: Amit Kapila and Dilip Kumar Discussion: https://postgr.es/m/CA+fd4k5_pPAYRTDrO2PbtTOe0eHQpBvuqmCr8ic39uTNmR49Eg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +112 −0 |
| src/backend/catalog/system_views.sql | modified | +10 −0 |
| src/backend/postmaster/pgstat.c | modified | +320 −0 |
| src/backend/replication/logical/decode.c | modified | +9 −0 |
| src/backend/replication/logical/logical.c | modified | +29 −0 |
| src/backend/replication/logical/reorderbuffer.c | modified | +22 −0 |
| src/backend/replication/slot.c | modified | +23 −2 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +80 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +12 −0 |
| src/include/pgstat.h | modified | +50 −2 |
| src/include/replication/logical.h | modified | +1 −0 |
| src/include/replication/reorderbuffer.h | modified | +21 −3 |
| src/include/replication/slot.h | modified | +1 −0 |
| src/test/regress/expected/rules.out | modified | +6 −0 |
| src/tools/pgindent/typedefs.list | modified | +3 −0 |
Documentation touched
Discussion
- Resetting spilled txn statistics in pg_stat_replication 147 messages · 2020-06-02 → 2020-10-28