<listitem>
<para>
Create a new physical replication slot with the name specified in
- <option>--slot</option>, then start to stream WAL.
+ <option>--slot</option>, then exit.
</para>
</listitem>
</varlistentry>
/*
* 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"),
/*
* Check existence of destination folder.
*/
- if (!do_drop_slot)
+ if (!do_drop_slot && !do_create_slot)
{
DIR *dir = get_destination_dir(basedir);
if (!CreateReplicationSlot(conn, replication_slot, NULL, true,
slot_exists_ok))
disconnect_and_exit(1);
+ disconnect_and_exit(0);
}
/*