From 4fe7a6b51e08ae861d5b5508da695e007ad7a1b4 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 4 Jan 2007 00:58:01 +0000 Subject: 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. --- src/backend/main/main.c | 7 +++++-- src/backend/postmaster/postmaster.c | 9 +++++++-- src/backend/tcop/postgres.c | 7 ++++++- 3 files changed, 18 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/backend/main/main.c b/src/backend/main/main.c index a750cfe9fd9..d4188e91be8 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -13,7 +13,7 @@ * * * 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.105.2.1 2007/01/04 00:58:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -258,7 +258,10 @@ startup_hacks(const char *progname) } - +/* + * Help display should match the options accepted by PostmasterMain() + * and PostgresMain(). + */ static void help(const char *progname) { diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index dbe835f3d09..2b5e7d1ae0d 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -37,7 +37,7 @@ * * * 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.505.2.1 2007/01/04 00:58:01 tgl Exp $ * * NOTES * @@ -415,6 +415,11 @@ PostmasterMain(int argc, char *argv[]) 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) { switch (opt) @@ -513,7 +518,7 @@ PostmasterMain(int argc, char *argv[]) break; case 's': - SetConfigOption("log_statement_stats", optarg, PGC_POSTMASTER, PGC_S_ARGV); + SetConfigOption("log_statement_stats", "true", PGC_POSTMASTER, PGC_S_ARGV); break; case 'T': diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 03a3eca6abd..bcb116a50e4 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.518 2006/11/21 20:59:52 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.518.2.1 2007/01/04 00:58:01 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2757,6 +2757,11 @@ PostgresMain(int argc, char *argv[], const char *username) ctx = PGC_POSTMASTER; 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) { switch (flag) -- cgit v1.2.3