Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 85a5303

Browse files
committed
-D switch to postmaster should override any PGDATA environment variable
that might be hanging about. Now it does ... amazing nobody noticed this before ...
1 parent 1b4f150 commit 85a5303

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/backend/postmaster/postmaster.c

+5-11
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.139 2000/04/12 17:15:31 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.140 2000/04/27 02:59:17 tgl Exp $
1515
*
1616
* NOTES
1717
*
@@ -1725,11 +1725,8 @@ BackendStartup(Port *port)
17251725
putenv(envEntry[1]);
17261726
sprintf(envEntry[2], "PG_USER=%s", port->user);
17271727
putenv(envEntry[2]);
1728-
if (!getenv("PGDATA"))
1729-
{
1730-
sprintf(envEntry[3], "PGDATA=%s", DataDir);
1731-
putenv(envEntry[3]);
1732-
}
1728+
sprintf(envEntry[3], "PGDATA=%s", DataDir);
1729+
putenv(envEntry[3]);
17331730
sprintf(envEntry[4], "IPC_KEY=%d", ipc_key);
17341731
putenv(envEntry[4]);
17351732

@@ -2175,11 +2172,8 @@ SSDataBase(bool startup)
21752172
putenv(ssEntry[0]);
21762173
sprintf(ssEntry[1], "POSTID=%d", NextBackendTag);
21772174
putenv(ssEntry[1]);
2178-
if (!getenv("PGDATA"))
2179-
{
2180-
sprintf(ssEntry[2], "PGDATA=%s", DataDir);
2181-
putenv(ssEntry[2]);
2182-
}
2175+
sprintf(ssEntry[2], "PGDATA=%s", DataDir);
2176+
putenv(ssEntry[2]);
21832177
sprintf(ssEntry[3], "IPC_KEY=%d", ipc_key);
21842178
putenv(ssEntry[3]);
21852179

0 commit comments

Comments
 (0)