Content-Length: 266771 | pFad | http://github.com/postgrespro/postgres_cluster/commit/0d4d7d61850f4f4bc5f6fd0b7a9adb70232aed61

20 Don't allow both --source-server and --source-target args to pg_rewind. · postgrespro/postgres_cluster@0d4d7d6 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/0d4d7d61850f4f4bc5f6fd0b7a9adb70232aed61

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy