From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add facility to copy replication slots
Date: Fri, 05 Apr 2019 21:09:10 +0000
Message-ID: <E1hCW5G-0006CL-U2@gemulon.postgresql.org> (raw)
Add facility to copy replication slots
This allows the user to create duplicates of existing replication slots,
either logical or physical, and even changing properties such as whether
they are temporary or the output plugin used.
There are multiple uses for this, such as initializing multiple replicas
using the slot for one base backup; when doing investigation of logical
replication issues; and to select a different output plugins.
Author: Masahiko Sawada
Reviewed-by: Michael Paquier, Andres Freund, Petr Jelinek
Discussion: https://postgr.es/m/CAD21AoAm7XX8y_tOPP6j4Nzzch12FvA1wPqiO690RCk+uYVstg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9f06d79ef831ffa333f908f6d3debdb654292414
Modified Files
--------------
contrib/test_decoding/expected/slot.out | 234 ++++++++++++++++++++
contrib/test_decoding/sql/slot.sql | 94 ++++++++
doc/src/sgml/func.sgml | 41 ++++
src/backend/replication/logical/logical.c | 26 ++-
src/backend/replication/slotfuncs.c | 352 ++++++++++++++++++++++++++----
src/backend/replication/walsender.c | 1 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 35 +++
src/include/replication/logical.h | 1 +
9 files changed, 736 insertions(+), 50 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: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Add facility to copy replication slots
In-Reply-To: <E1hCW5G-0006CL-U2@gemulon.postgresql.org>
References: <E1hCW5G-0006CL-U2@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