Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecbdc4c

Browse files
committed
Forbid invalid combination of options in pg_basebackup.
Commit56c7d8d allowed pg_basebackupto stream WAL in tar mode. But there is the restriction that WALstreaming in tar mode works only when the value - (dash) is notspecified as output directory. This means that the combination ofthree options "-D -", "-F t" and "-X stream" is invalid. However,previously, even when those options were specified at the same time,pg_basebackup background process unexpectedly started streaming WAL.And then it exited with an error.This commit changes pg_basebackup so that it errors out on suchinvalid combination of options at the beginning.Reviewed by Magnus Hagander, and patch by me.
1 parentc080b22 commitecbdc4c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,16 @@ main(int argc, char **argv)
22682268
exit(1);
22692269
}
22702270

2271+
if (format=='t'&&streamwal&&strcmp(basedir,"-")==0)
2272+
{
2273+
fprintf(stderr,
2274+
_("%s: cannot stream transaction logs in tar mode to stdout\n"),
2275+
progname);
2276+
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),
2277+
progname);
2278+
exit(1);
2279+
}
2280+
22712281
if (replication_slot&& !streamwal)
22722282
{
22732283
fprintf(stderr,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp