Add facility to copy replication slots
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 5 Apr 2019 17:52:45 +0000 (14:52 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 5 Apr 2019 21:05:18 +0000 (18:05 -0300)
commit9f06d79ef831ffa333f908f6d3debdb654292414
treece7f58c5a4ed40c143244ec271134b8a343c8f69
parentde2b38419c4018fc8c2c917cc2cc752063096cfb
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
contrib/test_decoding/expected/slot.out
contrib/test_decoding/sql/slot.sql
doc/src/sgml/func.sgml
src/backend/replication/logical/logical.c
src/backend/replication/slotfuncs.c
src/backend/replication/walsender.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/include/replication/logical.h