diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2006-01-05 10:07:46 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2006-01-05 10:07:46 +0000 |
commit | 86c23a6eb28b0588644dcefeb33ef5a2aa8b9453 (patch) | |
tree | d0497d119ef7cf861fc046c58326a42e47c16c39 /src/backend/bootstrap | |
parent | 4e1712ea5499ad57d825eefa08e560dad715300c (diff) | |
download | postgresql-86c23a6eb28b0588644dcefeb33ef5a2aa8b9453.tar.gz |
Make all command-line options of postmaster and postgres the same. See
http://archives.postgresql.org/pgsql-hackers/2006-01/msg00151.php for the
complete plan.
Diffstat (limited to 'src/backend/bootstrap')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 66cf4c4ce0..68dd732ff1 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.210 2006/01/04 21:06:30 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.211 2006/01/05 10:07:44 petere Exp $ * *------------------------------------------------------------------------- */ @@ -255,10 +255,13 @@ BootstrapMain(int argc, char *argv[]) argc--; } - while ((flag = getopt(argc, argv, "B:c:d:D:Fo:p:x:-:")) != -1) + while ((flag = getopt(argc, argv, "B:c:d:D:Fr:x:y:-:")) != -1) { switch (flag) { + case 'B': + SetConfigOption("shared_buffers", optarg, PGC_POSTMASTER, PGC_S_ARGV); + break; case 'D': userDoption = optarg; break; @@ -278,18 +281,15 @@ BootstrapMain(int argc, char *argv[]) case 'F': SetConfigOption("fsync", "false", PGC_POSTMASTER, PGC_S_ARGV); break; - case 'o': + case 'r': StrNCpy(OutputFileName, optarg, MAXPGPATH); break; case 'x': xlogop = atoi(optarg); break; - case 'p': + case 'y': dbname = strdup(optarg); break; - case 'B': - SetConfigOption("shared_buffers", optarg, PGC_POSTMASTER, PGC_S_ARGV); - break; case 'c': case '-': { @@ -376,7 +376,7 @@ BootstrapMain(int argc, char *argv[]) CreateDataDirLockFile(false); SetProcessingMode(BootstrapProcessing); - IgnoreSystemIndexes(true); + IgnoreSystemIndexes = true; BaseInit(); @@ -499,14 +499,16 @@ BootstrapMain(int argc, char *argv[]) static void usage(void) { - write_stderr("Usage:\n" - " postgres -boot [OPTION]... DBNAME\n" - " -c NAME=VALUE set run-time parameter\n" - " -d 1-5 debug level\n" - " -D datadir data directory\n" - " -F turn off fsync\n" - " -o file send debug output to file\n" - " -x num internal use\n"); + fprintf(stderr, _("This is the PostgreSQL bootstrap process.\n\n")); + fprintf(stderr, _("Usage:\n postgres -boot [OPTION]... DBNAME\n\n")); + fprintf(stderr, _("Options:\n")); + fprintf(stderr, _(" -B NBUFFERS number of shared buffers\n")); + fprintf(stderr, _(" -c NAME=VALUE set run-time parameter\n")); + fprintf(stderr, _(" -d 1-5 debugging level\n")); + fprintf(stderr, _(" -D DATADIR database directory\n")); + fprintf(stderr, _(" -F turn fsync off\n")); + fprintf(stderr, _(" -r FILENAME send stdout and stderr to given file\n")); + fprintf(stderr, _(" -x NUM internal use\n")); proc_exit(1); } |