diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-09-26 16:07:52 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-09-27 08:49:47 -0400 |
commit | 3709ca1cf069cee24ef8000cb6a479813b5537df (patch) | |
tree | d54dbade52078b66be199c1402ed4ef9540828ce /src/bin/pg_basebackup/pg_recvlogical.c | |
parent | 59597e6485847ae40eab2e80ff04af3e8663f2d8 (diff) | |
download | postgresql-3709ca1cf069cee24ef8000cb6a479813b5537df.tar.gz postgresql-3709ca1cf069cee24ef8000cb6a479813b5537df.zip |
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>
Diffstat (limited to 'src/bin/pg_basebackup/pg_recvlogical.c')
-rw-r--r-- | src/bin/pg_basebackup/pg_recvlogical.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index 6811a55e764..3109d0f99fb 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -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; } |