]> granicus.if.org Git - postgresql/commitdiff
-D switch to postmaster should override any PGDATA environment variable
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 27 Apr 2000 02:59:17 +0000 (02:59 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 27 Apr 2000 02:59:17 +0000 (02:59 +0000)
that might be hanging about.  Now it does ... amazing nobody noticed
this before ...

src/backend/postmaster/postmaster.c

index 9505d3599f78f6b53d77f715cd25be02483ec080..03f356bfc0703dc45a3c5d60b25912f6f248d5af 100644 (file)
@@ -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]);