Commit 8bcb31ad authored by Tom Lane's avatar Tom Lane

Sync pg_ctl documentation and usage message with reality.

Commit 05cd12ed ("pg_ctl: Change default to wait for all actions")
was a tad sloppy about updating the documentation to match.  The
documentation was also sorely in need of a copy-editing pass, having
been adjusted at different times by different people who took little
care to maintain consistency of style.
parent 594b526b
This diff is collapsed.
...@@ -1932,18 +1932,19 @@ do_help(void) ...@@ -1932,18 +1932,19 @@ do_help(void)
{ {
printf(_("%s is a utility to initialize, start, stop, or control a PostgreSQL server.\n\n"), progname); printf(_("%s is a utility to initialize, start, stop, or control a PostgreSQL server.\n\n"), progname);
printf(_("Usage:\n")); printf(_("Usage:\n"));
printf(_(" %s init[db] [-D DATADIR] [-s] [-o \"OPTIONS\"]\n"), progname); printf(_(" %s init[db] [-D DATADIR] [-s] [-o OPTIONS]\n"), progname);
printf(_(" %s start [-w] [-t SECS] [-D DATADIR] [-s] [-l FILENAME] [-o \"OPTIONS\"]\n"), progname); printf(_(" %s start [-D DATADIR] [-l FILENAME] [-W] [-t SECS] [-s]\n"
printf(_(" %s stop [-W] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n"), progname); " [-o OPTIONS] [-p PATH] [-c]\n"), progname);
printf(_(" %s restart [-w] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n" printf(_(" %s stop [-D DATADIR] [-m SHUTDOWN-MODE] [-W] [-t SECS] [-s]\n"), progname);
" [-o \"OPTIONS\"]\n"), progname); printf(_(" %s restart [-D DATADIR] [-m SHUTDOWN-MODE] [-W] [-t SECS] [-s]\n"
printf(_(" %s reload [-D DATADIR] [-s]\n"), progname); " [-o OPTIONS] [-c]\n"), progname);
printf(_(" %s status [-D DATADIR]\n"), progname); printf(_(" %s reload [-D DATADIR] [-s]\n"), progname);
printf(_(" %s promote [-w] [-t SECS] [-D DATADIR] [-s]\n"), progname); printf(_(" %s status [-D DATADIR]\n"), progname);
printf(_(" %s kill SIGNALNAME PID\n"), progname); printf(_(" %s promote [-D DATADIR] [-W] [-t SECS] [-s]\n"), progname);
printf(_(" %s kill SIGNALNAME PID\n"), progname);
#ifdef WIN32 #ifdef WIN32
printf(_(" %s register [-N SERVICENAME] [-U USERNAME] [-P PASSWORD] [-D DATADIR]\n" printf(_(" %s register [-D DATADIR] [-N SERVICENAME] [-U USERNAME] [-P PASSWORD]\n"
" [-S START-TYPE] [-w] [-t SECS] [-o \"OPTIONS\"]\n"), progname); " [-S START-TYPE] [-e SOURCE] [-W] [-t SECS] [-s] [-o OPTIONS]\n"), progname);
printf(_(" %s unregister [-N SERVICENAME]\n"), progname); printf(_(" %s unregister [-N SERVICENAME]\n"), progname);
#endif #endif
...@@ -1958,7 +1959,6 @@ do_help(void) ...@@ -1958,7 +1959,6 @@ do_help(void)
printf(_(" -w, --wait wait until operation completes (default)\n")); printf(_(" -w, --wait wait until operation completes (default)\n"));
printf(_(" -W, --no-wait do not wait until operation completes\n")); printf(_(" -W, --no-wait do not wait until operation completes\n"));
printf(_(" -?, --help show this help, then exit\n")); printf(_(" -?, --help show this help, then exit\n"));
printf(_("(The default is to wait for shutdown, but not for start or restart.)\n\n"));
printf(_("If the -D option is omitted, the environment variable PGDATA is used.\n")); printf(_("If the -D option is omitted, the environment variable PGDATA is used.\n"));
printf(_("\nOptions for start or restart:\n")); printf(_("\nOptions for start or restart:\n"));
...@@ -1976,7 +1976,7 @@ do_help(void) ...@@ -1976,7 +1976,7 @@ do_help(void)
printf(_("\nShutdown modes are:\n")); printf(_("\nShutdown modes are:\n"));
printf(_(" smart quit after all clients have disconnected\n")); printf(_(" smart quit after all clients have disconnected\n"));
printf(_(" fast quit directly, with proper shutdown\n")); printf(_(" fast quit directly, with proper shutdown (default)\n"));
printf(_(" immediate quit without complete shutdown; will lead to recovery on restart\n")); printf(_(" immediate quit without complete shutdown; will lead to recovery on restart\n"));
printf(_("\nAllowed signal names for kill:\n")); printf(_("\nAllowed signal names for kill:\n"));
...@@ -2242,7 +2242,8 @@ main(int argc, char **argv) ...@@ -2242,7 +2242,8 @@ main(int argc, char **argv)
/* process command-line options */ /* process command-line options */
while (optind < argc) while (optind < argc)
{ {
while ((c = getopt_long(argc, argv, "cD:e:l:m:N:o:p:P:sS:t:U:wW", long_options, &option_index)) != -1) while ((c = getopt_long(argc, argv, "cD:e:l:m:N:o:p:P:sS:t:U:wW",
long_options, &option_index)) != -1)
{ {
switch (c) switch (c)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment