From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Track statistics for streaming of changes from ReorderBuffer.
Date: Thu, 29 Oct 2020 04:05:45 +0000
Message-ID: <E1kXzC5-0006NK-Du@gemulon.postgresql.org> (raw)
Track statistics for streaming of changes from ReorderBuffer.
This adds the statistics about transactions streamed to the decoding
output plugin 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.
Commit 9868167500 has added the basic infrastructure to capture the stats
of slot and this commit extends the statistics collector to track
additional information about slots.
Bump the catversion as we have added new columns in the catalog entry.
Author: Ajin Cherian and Amit Kapila
Reviewed-by: Sawada Masahiko and Dilip Kumar
Discussion: https://postgr.es/m/CAA4eK1+chpEomLzgSoky-D31qev19AmECNiEAietPQUGEFhtVA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8e90ec5580d5345fef31005d7cc2215ba2125070
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 38 +++++++++++++++++++++++++
src/backend/catalog/system_views.sql | 3 ++
src/backend/postmaster/pgstat.c | 11 ++++++-
src/backend/replication/logical/logical.c | 19 +++++++++----
src/backend/replication/logical/reorderbuffer.c | 20 +++++++++++++
src/backend/replication/slot.c | 2 +-
src/backend/utils/adt/pgstatfuncs.c | 9 ++++--
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 6 ++--
src/include/pgstat.h | 8 +++++-
src/include/replication/reorderbuffer.h | 5 ++++
src/test/regress/expected/rules.out | 5 +++-
12 files changed, 111 insertions(+), 17 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: Track statistics for streaming of changes from ReorderBuffer.
In-Reply-To: <E1kXzC5-0006NK-Du@gemulon.postgresql.org>
References: <E1kXzC5-0006NK-Du@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