pg_basebackup: Add option to create replication slot

When requesting a particular replication slot, the new pg_basebackup
option -C/--create-slot creates it before starting to replicate from it.

Further refactor the slot creation logic to include the temporary slot
creation logic into the same function.  Add new arguments is_temporary
and preserve_wal to CreateReplicationSlot().  Print in --verbose mode
that a slot has been created.

Author: Michael Banck <michael.ba...@credativ.de>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3709ca1cf069cee24ef8000cb6a479813b5537df

Modified Files
--------------
doc/src/sgml/ref/pg_basebackup.sgml          | 16 +++++++
src/bin/pg_basebackup/pg_basebackup.c        | 63 ++++++++++++++++++++++++----
src/bin/pg_basebackup/pg_receivewal.c        |  3 +-
src/bin/pg_basebackup/pg_recvlogical.c       |  4 +-
src/bin/pg_basebackup/receivelog.c           | 18 --------
src/bin/pg_basebackup/receivelog.h           |  1 -
src/bin/pg_basebackup/streamutil.c           | 16 ++++---
src/bin/pg_basebackup/streamutil.h           |  5 ++-
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 27 +++++++++++-
9 files changed, 112 insertions(+), 41 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to