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

Commitb24181b

Browse files
committed
Improve pg_archivecleanup and pg_standby --help output
For consistency with other tools, put the options before further usageinformation.In pg_standby, remove the supposedly deprecated -l option from thegiven example invocation.
1 parentd6d823c commitb24181b

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎contrib/pg_archivecleanup/pg_archivecleanup.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,19 @@ usage(void)
203203
printf("%s removes older WAL files from PostgreSQL archives.\n\n",progname);
204204
printf("Usage:\n");
205205
printf(" %s [OPTION]... ARCHIVELOCATION OLDESTKEPTWALFILE\n",progname);
206+
printf("\nOptions:\n");
207+
printf(" -d generates debug output (verbose mode)\n");
208+
printf(" --help show this help, then exit\n");
209+
printf(" --version output version information, then exit\n");
206210
printf("\n"
207-
"for use asanarchive_cleanup_command in the recovery.conf when standby_mode = on:\n"
211+
"For use as archive_cleanup_command in recovery.conf when standby_mode = on:\n"
208212
" archive_cleanup_command = 'pg_archivecleanup [OPTION]... ARCHIVELOCATION %%r'\n"
209213
"e.g.\n"
210214
" archive_cleanup_command = 'pg_archivecleanup /mnt/server/archiverdir %%r'\n");
211215
printf("\n"
212-
"or for use as a standalone archive cleaner:\n"
216+
"Or for use as a standalone archive cleaner:\n"
213217
"e.g.\n"
214218
" pg_archivecleanup /mnt/server/archiverdir 000000010000000000000010.00000020.backup\n");
215-
printf("\nOptions:\n");
216-
printf(" -d generates debug output (verbose mode)\n");
217-
printf(" --help show this help, then exit\n");
218-
printf(" --version output version information, then exit\n");
219219
printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n");
220220
}
221221

‎contrib/pg_standby/pg_standby.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,6 @@ usage(void)
515515
printf("%s allows PostgreSQL warm standby servers to be configured.\n\n",progname);
516516
printf("Usage:\n");
517517
printf(" %s [OPTION]... ARCHIVELOCATION NEXTWALFILE XLOGFILEPATH [RESTARTWALFILE]\n",progname);
518-
printf("\n"
519-
"with main intended use as a restore_command in the recovery.conf:\n"
520-
" restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"
521-
"e.g.\n"
522-
" restore_command = 'pg_standby -l /mnt/server/archiverdir %%f %%p %%r'\n");
523518
printf("\nOptions:\n");
524519
printf(" -c copies file from archive (default)\n");
525520
printf(" -d generate lots of debugging output (testing only)\n");
@@ -534,6 +529,11 @@ usage(void)
534529
printf(" -w MAXWAITTIME max seconds to wait for a file (0=no limit) (default=0)\n");
535530
printf(" --help show this help, then exit\n");
536531
printf(" --version output version information, then exit\n");
532+
printf("\n"
533+
"Main intended use as restore_command in recovery.conf:\n"
534+
" restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"
535+
"e.g.\n"
536+
" restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
537537
printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n");
538538
}
539539

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp