pg_basebackup: Add option to create replication slot
Peter Eisentraut <peter_e@gmx.net>
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.banck@credativ.de>
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/pg_basebackup.sgml | modified | +16 −0 |
| src/bin/pg_basebackup/pg_basebackup.c | modified | +54 −9 |
| src/bin/pg_basebackup/pg_receivewal.c | modified | +1 −2 |
| src/bin/pg_basebackup/pg_recvlogical.c | modified | +2 −2 |
| src/bin/pg_basebackup/receivelog.c | modified | +0 −18 |
| src/bin/pg_basebackup/receivelog.h | modified | +0 −1 |
| src/bin/pg_basebackup/streamutil.c | modified | +11 −5 |
| src/bin/pg_basebackup/streamutil.h | modified | +3 −2 |
| src/bin/pg_basebackup/t/010_pg_basebackup.pl | modified | +25 −2 |