diff options
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 98ad33866be..90e5c2b96c4 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 - * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.135 2002/08/02 22:36:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.136 2002/08/04 06:26:38 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -223,6 +223,7 @@ BootstrapMain(int argc, char *argv[]) int flag; int xlogop = BS_XLOG_NOP; char *potential_DataDir = NULL; + char *potential_XLogDir = NULL; /* * initialize globals @@ -250,17 +251,22 @@ BootstrapMain(int argc, char *argv[]) if (!IsUnderPostmaster) { InitializeGUCOptions(); - potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA - * variable */ + /* Null if no PGDATA variable */ + potential_DataDir = getenv("PGDATA"); + /* Null if no PGXLOG variable */ + potential_XLogDir = getenv("PGXLOG"); } - while ((flag = getopt(argc, argv, "B:d:D:Fo:px:")) != -1) + while ((flag = getopt(argc, argv, "B:d:D:X:Fo:px:")) != -1) { switch (flag) { case 'D': potential_DataDir = optarg; break; + case 'X': + potential_XLogDir = optarg; + break; case 'd': { /* Turn on debugging for the bootstrap process. */ @@ -315,6 +321,7 @@ BootstrapMain(int argc, char *argv[]) proc_exit(1); } SetDataDir(potential_DataDir); + SetXLogDir(potential_XLogDir); } /* Validate we have been given a reasonable-looking DataDir */ |