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/tcop/postgres.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index c42bd6c7bfb..54ba0a1fe6f 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.422 2004/07/01 00:51:11 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.423 2004/07/11 00:18:44 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2164,7 +2164,7 @@ PostgresMain(int argc, char *argv[], const char *username) { int flag; const char *dbname = NULL; - char *potential_DataDir = NULL; + char *userPGDATA = NULL; bool secure; int errs = 0; int debug_flag = 0; @@ -2235,7 +2235,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { InitializeGUCOptions(); - potential_DataDir = getenv("PGDATA"); + userPGDATA = getenv("PGDATA"); } /* ---------------- @@ -2283,7 +2283,7 @@ PostgresMain(int argc, char *argv[], const char *username) case 'D': /* PGDATA directory */ if (secure) - potential_DataDir = optarg; + userPGDATA = optarg; break; case 'd': /* debug level */ @@ -2574,12 +2574,12 @@ PostgresMain(int argc, char *argv[], const char *username) * set up handler to log session end. */ if (IsUnderPostmaster && Log_disconnections) - on_proc_exit(log_disconnections,0); + on_proc_exit(log_disconnections, 0); } 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" @@ -2588,7 +2588,7 @@ PostgresMain(int argc, char *argv[], const char *username) argv[0]); proc_exit(1); } - SetDataDir(potential_DataDir); + SetDataDir(userPGDATA); } Assert(DataDir); -- cgit v1.2.3