Add information of total data processed to replication slot stats.
authorAmit Kapila <akapila@postgresql.org>
Fri, 16 Apr 2021 02:04:43 +0000 (07:34 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 16 Apr 2021 02:04:43 +0000 (07:34 +0530)
commitf5fc2f5b23d1b1dff60f8ca5dc211161df47eda4
tree440595580ef83eac4609e3cd74c2fe43bc73f28b
parent1bf946bd43e545b86e567588b791311fe4e36a8c
Add information of total data processed to replication slot stats.

This adds the statistics about total transactions count and total
transaction data logically sent to the decoding output plugin from
ReorderBuffer. Users can query the pg_stat_replication_slots view to check
these stats.

Suggested-by: Andres Freund
Author: Vignesh C and Amit Kapila
Reviewed-by: Sawada Masahiko, Amit Kapila
Discussion: https://postgr.es/m/20210319185247.ldebgpdaxsowiflw@alap3.anarazel.de
15 files changed:
contrib/test_decoding/Makefile
contrib/test_decoding/expected/stats.out
contrib/test_decoding/sql/stats.sql
contrib/test_decoding/t/001_repl_stats.pl [new file with mode: 0644]
doc/src/sgml/monitoring.sgml
src/backend/catalog/system_views.sql
src/backend/postmaster/pgstat.c
src/backend/replication/logical/logical.c
src/backend/replication/logical/reorderbuffer.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/reorderbuffer.h
src/test/regress/expected/rules.out