Commit eeb21891 authored by Tom Lane's avatar Tom Lane

Fix erroneous implementation of -s in postmaster.c (the switch doesn't take

an optarg).  Add some comments noting that code in three different files has
to be kept in sync.  Fix erroneous description of -S switch (it sets work_mem
not silent_mode), and do some light copy-editing elsewhere in postgres-ref.
parent d6061d2f
This diff is collapsed.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/main/main.c,v 1.105 2006/10/04 00:29:53 momjian Exp $ * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.106 2007/01/04 00:57:51 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -258,7 +258,10 @@ startup_hacks(const char *progname) ...@@ -258,7 +258,10 @@ startup_hacks(const char *progname)
} }
/*
* Help display should match the options accepted by PostmasterMain()
* and PostgresMain().
*/
static void static void
help(const char *progname) help(const char *progname)
{ {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.505 2006/11/30 18:29:12 tgl Exp $ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.506 2007/01/04 00:57:51 tgl Exp $
* *
* NOTES * NOTES
* *
...@@ -415,6 +415,11 @@ PostmasterMain(int argc, char *argv[]) ...@@ -415,6 +415,11 @@ PostmasterMain(int argc, char *argv[])
opterr = 1; opterr = 1;
/*
* Parse command-line options. CAUTION: keep this in sync with
* tcop/postgres.c (the option sets should not conflict)
* and with the common help() function in main/main.c.
*/
while ((opt = getopt(argc, argv, "A:B:c:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:W:-:")) != -1) while ((opt = getopt(argc, argv, "A:B:c:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:W:-:")) != -1)
{ {
switch (opt) switch (opt)
...@@ -513,7 +518,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -513,7 +518,7 @@ PostmasterMain(int argc, char *argv[])
break; break;
case 's': case 's':
SetConfigOption("log_statement_stats", optarg, PGC_POSTMASTER, PGC_S_ARGV); SetConfigOption("log_statement_stats", "true", PGC_POSTMASTER, PGC_S_ARGV);
break; break;
case 'T': case 'T':
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.519 2006/12/08 02:15:07 neilc Exp $ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.520 2007/01/04 00:57:51 tgl Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
...@@ -2756,6 +2756,11 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2756,6 +2756,11 @@ PostgresMain(int argc, char *argv[], const char *username)
ctx = PGC_POSTMASTER; ctx = PGC_POSTMASTER;
gucsource = PGC_S_ARGV; /* initial switches came from command line */ gucsource = PGC_S_ARGV; /* initial switches came from command line */
/*
* Parse command-line options. CAUTION: keep this in sync with
* postmaster/postmaster.c (the option sets should not conflict)
* and with the common help() function in main/main.c.
*/
while ((flag = getopt(argc, argv, "A:B:c:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:v:W:y:-:")) != -1) while ((flag = getopt(argc, argv, "A:B:c:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:v:W:y:-:")) != -1)
{ {
switch (flag) switch (flag)
......
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