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

Commit1713e3d

Browse files
committed
Minor fixes to pg_combinebackup and its documentation.
The --tablespace-mapping option was specified with required_argumentrather than no_argument, which is wrong. Since the actual argumentstring passed to getopt_long() included "T:", the single-characterform of the option still worked, but the long form did not. Repair.The call to getopt_long() erroneously included "P", which doesn'tcorrespond to any supported option. Remove.The help message used "do not" in one place and "don't" in another.Standardize on "do not".The documentation erroneously stated that the tablespace mappingswould be applied relative to the pathnames in the first backupspecified on the command line, rather than the final one. Fix.Thanks to Tomas Vondra and Daniel Gustafsson for alerting me tothese mistakes.Discussion:http://postgr.es/m/CA+TgmoYFznwwaZhHSF1Ze7JeyBv-1yOoSrucKMw37WpF=7RP8g@mail.gmail.com
1 parent205db01 commit1713e3d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎doc/src/sgml/ref/pg_combinebackup.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ PostgreSQL documentation
128128
Relocates the tablespace in directory <replaceable>olddir</replaceable>
129129
to <replaceable>newdir</replaceable> during the backup.
130130
<replaceable>olddir</replaceable> is the absolute path of the tablespace
131-
as it exists in thefirst backup specified on the command line,
131+
as it exists in thefinal backup specified on the command line,
132132
and <replaceable>newdir</replaceable> is the absolute path to use for the
133133
tablespace in the reconstructed backup. If either path needs to contain
134134
an equal sign (<literal>=</literal>), precede that with a backslash.

‎src/bin/pg_combinebackup/pg_combinebackup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ main(int argc, char *argv[])
126126
{"dry-run",no_argument,NULL,'n'},
127127
{"no-sync",no_argument,NULL,'N'},
128128
{"output",required_argument,NULL,'o'},
129-
{"tablespace-mapping",no_argument,NULL,'T'},
129+
{"tablespace-mapping",required_argument,NULL,'T'},
130130
{"manifest-checksums",required_argument,NULL,1},
131131
{"no-manifest",no_argument,NULL,2},
132132
{"sync-method",required_argument,NULL,3},
@@ -163,7 +163,7 @@ main(int argc, char *argv[])
163163
opt.copy_method=COPY_METHOD_COPY;
164164

165165
/* process command-line options */
166-
while ((c=getopt_long(argc,argv,"dnNPo:T:",
166+
while ((c=getopt_long(argc,argv,"dnNo:T:",
167167
long_options,&optindex))!=-1)
168168
{
169169
switch (c)
@@ -749,7 +749,7 @@ help(const char *progname)
749749
printf(_(" %s [OPTION]... DIRECTORY...\n"),progname);
750750
printf(_("\nOptions:\n"));
751751
printf(_(" -d, --debug generate lots of debugging output\n"));
752-
printf(_(" -n, --dry-rundon't actually do anything\n"));
752+
printf(_(" -n, --dry-rundo not actually do anything\n"));
753753
printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n"));
754754
printf(_(" -o, --output output directory\n"));
755755
printf(_(" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp