Track statistics for spilling of changes from ReorderBuffer.
authorAmit Kapila <[email protected]>
Thu, 8 Oct 2020 03:39:08 +0000 (09:09 +0530)
committerAmit Kapila <[email protected]>
Thu, 8 Oct 2020 03:39:08 +0000 (09:09 +0530)
commit98681675002d852d926a49d7bc4d4b4856b2fc4a
treee30f3bd90ae90d11b6a1ac4a7d705f6adfb6dd50
parent8d2a01ae12cd657b33ffd50eace86a341636c586
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
16 files changed:
doc/src/sgml/monitoring.sgml
src/backend/catalog/system_views.sql
src/backend/postmaster/pgstat.c
src/backend/replication/logical/decode.c
src/backend/replication/logical/logical.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/slot.c
src/backend/utils/adt/pgstatfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/include/pgstat.h
src/include/replication/logical.h
src/include/replication/reorderbuffer.h
src/include/replication/slot.h
src/test/regress/expected/rules.out
src/tools/pgindent/typedefs.list