Commit 85a53038 authored by Tom Lane's avatar Tom Lane

-D switch to postmaster should override any PGDATA environment variable

that might be hanging about.  Now it does ... amazing nobody noticed
this before ...
parent 1b4f1505
......@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.139 2000/04/12 17:15:31 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.140 2000/04/27 02:59:17 tgl Exp $
*
* NOTES
*
......@@ -1725,11 +1725,8 @@ BackendStartup(Port *port)
putenv(envEntry[1]);
sprintf(envEntry[2], "PG_USER=%s", port->user);
putenv(envEntry[2]);
if (!getenv("PGDATA"))
{
sprintf(envEntry[3], "PGDATA=%s", DataDir);
putenv(envEntry[3]);
}
sprintf(envEntry[3], "PGDATA=%s", DataDir);
putenv(envEntry[3]);
sprintf(envEntry[4], "IPC_KEY=%d", ipc_key);
putenv(envEntry[4]);
......@@ -2175,11 +2172,8 @@ SSDataBase(bool startup)
putenv(ssEntry[0]);
sprintf(ssEntry[1], "POSTID=%d", NextBackendTag);
putenv(ssEntry[1]);
if (!getenv("PGDATA"))
{
sprintf(ssEntry[2], "PGDATA=%s", DataDir);
putenv(ssEntry[2]);
}
sprintf(ssEntry[2], "PGDATA=%s", DataDir);
putenv(ssEntry[2]);
sprintf(ssEntry[3], "IPC_KEY=%d", ipc_key);
putenv(ssEntry[3]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment