From 130f89e93f59cdb4b160cbc31e6929de25d13794 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 11 Jul 2004 00:18:45 +0000 Subject: Allow configuration files to be placed outside the data directory. Add new postgresql.conf variables to point to data, pg_hba.conf, and pg_ident.conf files. Needs more documentation. --- src/backend/bootstrap/bootstrap.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/backend/bootstrap/bootstrap.c') diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index ccf0595835e..7fe2ea02a65 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.185 2004/06/24 21:02:24 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.186 2004/07/11 00:18:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -212,7 +212,7 @@ BootstrapMain(int argc, char *argv[]) char *dbname; int flag; int xlogop = BS_XLOG_NOP; - char *potential_DataDir = NULL; + char *userPGDATA = NULL; /* * initialize globals @@ -236,8 +236,7 @@ BootstrapMain(int argc, char *argv[]) if (!IsUnderPostmaster) { InitializeGUCOptions(); - potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA - * variable */ + userPGDATA = getenv("PGDATA"); /* Null if no PGDATA variable */ } /* Ignore the initial -boot argument, if present */ @@ -252,7 +251,7 @@ BootstrapMain(int argc, char *argv[]) switch (flag) { case 'D': - potential_DataDir = optarg; + userPGDATA = optarg; break; case 'd': { @@ -326,7 +325,7 @@ BootstrapMain(int argc, char *argv[]) if (!IsUnderPostmaster) { - if (!potential_DataDir) + if (!userPGDATA) { write_stderr("%s does not know where to find the database system data.\n" "You must specify the directory that contains the database system\n" @@ -335,7 +334,7 @@ BootstrapMain(int argc, char *argv[]) argv[0]); proc_exit(1); } - SetDataDir(potential_DataDir); + SetDataDir(userPGDATA); } /* Validate we have been given a reasonable-looking DataDir */ -- cgit v1.2.3