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

Commit a0fb59d

Browse files
committed
pg_recvlogical: Improve --help output
List the actions first, as they are the most important options. Group the other options more sensibly, consistent with the man page. Correct a few typographical errors, clarify some things. Also update the pg_receivexlog --help output to make it a bit more consistent with that of pg_recvlogical.
1 parent b7a08c8 commit a0fb59d

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

src/bin/pg_basebackup/pg_receivexlog.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,22 @@ usage(void)
6666
printf(_(" %s [OPTION]...\n"), progname);
6767
printf(_("\nOptions:\n"));
6868
printf(_(" -D, --directory=DIR receive transaction log files into this directory\n"));
69+
printf(_(" -F --fsync-interval=SECS\n"
70+
" time between fsyncs to transaction log files (default: %d)\n"), (fsync_interval / 1000));
6971
printf(_(" -n, --no-loop do not loop on connection lost\n"));
70-
printf(_(" -F --fsync-interval=INTERVAL\n"
71-
" frequency of syncs to transaction log files (in seconds)\n"));
72+
printf(_(" -s, --status-interval=SECS\n"
73+
" time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
74+
printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
7275
printf(_(" -v, --verbose output verbose messages\n"));
7376
printf(_(" -V, --version output version information, then exit\n"));
7477
printf(_(" -?, --help show this help, then exit\n"));
7578
printf(_("\nConnection options:\n"));
7679
printf(_(" -d, --dbname=CONNSTR connection string\n"));
7780
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
7881
printf(_(" -p, --port=PORT database server port number\n"));
79-
printf(_(" -s, --status-interval=INTERVAL\n"
80-
" time between status packets sent to server (in seconds)\n"));
8182
printf(_(" -U, --username=NAME connect as specified database user\n"));
8283
printf(_(" -w, --no-password never prompt for password\n"));
8384
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
84-
printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
8585
printf(_("\nOptional actions:\n"));
8686
printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
8787
printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n"));

src/bin/pg_basebackup/pg_recvlogical.c

+15-16
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,27 @@ static void disconnect_and_exit(int code);
6262
static void
6363
usage(void)
6464
{
65-
printf(_("%s receives PostgreSQL logical change stream.\n\n"),
65+
printf(_("%s receives PostgreSQL logical change streams.\n\n"),
6666
progname);
6767
printf(_("Usage:\n"));
6868
printf(_(" %s [OPTION]...\n"), progname);
69+
printf(_("\nAction to be performed:\n"));
70+
printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
71+
printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n"));
72+
printf(_(" --start start streaming in a replication slot (for the slot's name see --slot)\n"));
6973
printf(_("\nOptions:\n"));
70-
printf(_(" -f, --file=FILE receive log into this file. - for stdout\n"));
74+
printf(_(" -f, --file=FILE receive log into this file, - for stdout\n"));
7175
printf(_(" -F --fsync-interval=SECS\n"
72-
" frequency of syncs to the output file (default: %d)\n"), (fsync_interval / 1000));
76+
" time between fsyncs to the output file (default: %d)\n"), (fsync_interval / 1000));
77+
printf(_(" -I, --startpos=LSN where in an existing slot should the streaming start\n"));
7378
printf(_(" -n, --no-loop do not loop on connection lost\n"));
79+
printf(_(" -o, --option=NAME[=VALUE]\n"
80+
" pass option NAME with optional value VALUE to the\n"
81+
" output plugin\n"));
82+
printf(_(" -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"), plugin);
83+
printf(_(" -s, --status-interval=SECS\n"
84+
" time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
85+
printf(_(" -S, --slot=SLOTNAME name of the logical replication slot\n"));
7486
printf(_(" -v, --verbose output verbose messages\n"));
7587
printf(_(" -V, --version output version information, then exit\n"));
7688
printf(_(" -?, --help show this help, then exit\n"));
@@ -81,19 +93,6 @@ usage(void)
8193
printf(_(" -U, --username=NAME connect as specified database user\n"));
8294
printf(_(" -w, --no-password never prompt for password\n"));
8395
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
84-
printf(_("\nReplication options:\n"));
85-
printf(_(" -I, --startpos=PTR where in an existing slot should the streaming start\n"));
86-
printf(_(" -o, --option=NAME[=VALUE]\n"
87-
" specify option NAME with optional value VALUE, to be passed\n"
88-
" to the output plugin\n"));
89-
printf(_(" -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"), plugin);
90-
printf(_(" -s, --status-interval=SECS\n"
91-
" time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
92-
printf(_(" -S, --slot=SLOT name of the logical replication slot\n"));
93-
printf(_("\nAction to be performed:\n"));
94-
printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
95-
printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n"));
96-
printf(_(" --start start streaming in a replication slot (for the slot's name see --slot)\n"));
9796
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
9897
}
9998

0 commit comments

Comments
 (0)