aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_basebackup/pg_receivexlog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
index 00536bd0972..ca648d9716a 100644
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ b/src/bin/pg_basebackup/pg_receivexlog.c
@@ -508,7 +508,7 @@ main(int argc, char **argv)
/*
* Required arguments
*/
- if (basedir == NULL && !do_drop_slot)
+ if (basedir == NULL && !do_drop_slot && !do_create_slot)
{
fprintf(stderr, _("%s: no target directory specified\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
@@ -519,7 +519,7 @@ main(int argc, char **argv)
/*
* Check existence of destination folder.
*/
- if (!do_drop_slot)
+ if (!do_drop_slot && !do_create_slot)
{
DIR *dir = get_destination_dir(basedir);
@@ -584,6 +584,7 @@ main(int argc, char **argv)
if (!CreateReplicationSlot(conn, replication_slot, NULL, true,
slot_exists_ok))
disconnect_and_exit(1);
+ disconnect_and_exit(0);
}
/*