Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b24181b

Browse files
committed
Improve pg_archivecleanup and pg_standby --help output
For consistency with other tools, put the options before further usage information. In pg_standby, remove the supposedly deprecated -l option from the given example invocation.
1 parent d6d823c commit b24181b

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 as an archive_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)