mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
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>
This commit is contained in:
@@ -979,8 +979,8 @@ main(int argc, char **argv)
|
||||
_("%s: creating replication slot \"%s\"\n"),
|
||||
progname, replication_slot);
|
||||
|
||||
if (!CreateReplicationSlot(conn, replication_slot, plugin,
|
||||
false, slot_exists_ok))
|
||||
if (!CreateReplicationSlot(conn, replication_slot, plugin, false,
|
||||
false, false, slot_exists_ok))
|
||||
disconnect_and_exit(1);
|
||||
startpos = InvalidXLogRecPtr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user