Skip to content

Commit 0d4d7d6

Browse files
committed
Don't allow both --source-server and --source-target args to pg_rewind.
They are supposed to be mutually exclusive, but there was no check for that. Michael Banck Discussion: <20161007103414.GD12247@nighthawk.caipicrew.dd-dns.de>
1 parent 275bf98 commit 0d4d7d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bin/pg_rewind/pg_rewind.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ main(int argc, char **argv)
162162
exit(1);
163163
}
164164

165+
if (datadir_source != NULL && connstr_source != NULL)
166+
{
167+
fprintf(stderr, _("%s: only one of --source-pgdata or --source-server can be specified\n"), progname);
168+
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
169+
exit(1);
170+
}
171+
165172
if (datadir_target == NULL)
166173
{
167174
fprintf(stderr, _("%s: no target data directory specified (--target-pgdata)\n"), progname);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy