Skip to content

Commit 1b031ae

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 7ce2a45 commit 1b031ae

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

src/bin/pg_basebackup/pg_receivexlog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ usage(void)
6262
printf(_("\nOptions:\n"));
6363
printf(_(" -D, --directory=DIR receive transaction log files into this directory\n"));
6464
printf(_(" -n, --no-loop do not loop on connection lost\n"));
65+
printf(_(" -s, --status-interval=SECS\n"
66+
" time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
67+
printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
6568
printf(_(" -v, --verbose output verbose messages\n"));
6669
printf(_(" -V, --version output version information, then exit\n"));
6770
printf(_(" -?, --help show this help, then exit\n"));
6871
printf(_("\nConnection options:\n"));
6972
printf(_(" -d, --dbname=CONNSTR connection string\n"));
7073
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
7174
printf(_(" -p, --port=PORT database server port number\n"));
72-
printf(_(" -s, --status-interval=INTERVAL\n"
73-
" time between status packets sent to server (in seconds)\n"));
7475
printf(_(" -U, --username=NAME connect as specified database user\n"));
7576
printf(_(" -w, --no-password never prompt for password\n"));
7677
printf(_(" -W, --password force password prompt (should happen automatically)\n"));
77-
printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
7878
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
7979
}
8080

src/bin/pg_basebackup/pg_recvlogical.c

Lines changed: 15 additions & 16 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy