From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add replication command READ_REPLICATION_SLOT
Date: Sun, 24 Oct 2021 22:42:13 +0000
Message-ID: <E1memBx-0003Go-1Y@gemulon.postgresql.org> (raw)
Add replication command READ_REPLICATION_SLOT
The command is supported for physical slots for now, and returns the
type of slot, its restart_lsn and its restart_tli.
This will be useful for an upcoming patch related to pg_receivewal, to
allow the tool to be able to stream from the position of a slot, rather
than the last WAL position flushed by the backend (as reported by
IDENTIFY_SYSTEM) if the archive directory is found as empty, which would
be an advantage in the case of switching to a different archive
locations with the same slot used to avoid holes in WAL segment
archives.
Author: Ronan Dunklau
Reviewed-by: Kyotaro Horiguchi, Michael Paquier, Bharath Rupireddy
Discussion: https://postgr.es/m/18708360.4lzOvYHigE@aivenronan
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b4ada4e19fd7bedb433e46516ccd0ca4213d2719
Modified Files
--------------
doc/src/sgml/protocol.sgml | 48 +++++++++++++
src/backend/replication/repl_gram.y | 16 ++++-
src/backend/replication/repl_scanner.l | 1 +
src/backend/replication/walsender.c | 106 ++++++++++++++++++++++++++++
src/include/nodes/nodes.h | 1 +
src/include/nodes/replnodes.h | 11 +++
src/test/recovery/t/001_stream_rep.pl | 32 ++++++++-
src/test/recovery/t/006_logical_decoding.pl | 11 ++-
src/tools/pgindent/typedefs.list | 1 +
9 files changed, 224 insertions(+), 3 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: michael@paquier.xyz
Subject: Re: pgsql: Add replication command READ_REPLICATION_SLOT
In-Reply-To: <E1memBx-0003Go-1Y@gemulon.postgresql.org>
References: <E1memBx-0003Go-1Y@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