From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add information of total data processed to replication slot stat
Date: Fri, 16 Apr 2021 02:18:12 +0000
Message-ID: <E1lXE3g-0004zu-7V@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f5fc2f5b23d1b1dff60f8ca5dc211161df47eda4
Modified Files
--------------
contrib/test_decoding/Makefile | 2 +
contrib/test_decoding/expected/stats.out | 79 ++++++++++++++++++-------
contrib/test_decoding/sql/stats.sql | 48 ++++++++++-----
contrib/test_decoding/t/001_repl_stats.pl | 76 ++++++++++++++++++++++++
doc/src/sgml/monitoring.sgml | 25 ++++++++
src/backend/catalog/system_views.sql | 2 +
src/backend/postmaster/pgstat.c | 6 ++
src/backend/replication/logical/logical.c | 18 +++---
src/backend/replication/logical/reorderbuffer.c | 21 +++++++
src/backend/utils/adt/pgstatfuncs.c | 8 ++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 6 +-
src/include/pgstat.h | 4 ++
src/include/replication/reorderbuffer.h | 7 +++
src/test/regress/expected/rules.out | 4 +-
15 files changed, 256 insertions(+), 52 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org
Subject: Re: pgsql: Add information of total data processed to replication slot stat
In-Reply-To: <E1lXE3g-0004zu-7V@gemulon.postgresql.org>
References: <E1lXE3g-0004zu-7V@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox