mirror of https://github.com/postgres/postgres
Cleanup patch for exec() handling.
This commit is contained in:
parent
a7fd03e1de
commit
721996d889
|
@ -8,7 +8,7 @@
|
|||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.151 2003/05/03 03:52:07 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.152 2003/05/03 05:13:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
@ -236,7 +236,7 @@ BootstrapMain(int argc, char *argv[])
|
|||
*
|
||||
* If we are running under the postmaster, this is done already.
|
||||
*/
|
||||
if (!IsUnderPostmaster)
|
||||
if (!IsUnderPostmaster || ExecBackend)
|
||||
MemoryContextInit();
|
||||
|
||||
/*
|
||||
|
@ -245,9 +245,12 @@ BootstrapMain(int argc, char *argv[])
|
|||
|
||||
/* Set defaults, to be overriden by explicit options below */
|
||||
dbName = NULL;
|
||||
if (!IsUnderPostmaster)
|
||||
if (!IsUnderPostmaster || ExecBackend)
|
||||
{
|
||||
InitializeGUCOptions();
|
||||
#ifdef EXEC_BACKEND
|
||||
read_nondefault_variables();
|
||||
#endif
|
||||
potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA
|
||||
* variable */
|
||||
}
|
||||
|
@ -306,7 +309,7 @@ BootstrapMain(int argc, char *argv[])
|
|||
AttachSharedMemoryAndSemaphores();
|
||||
}
|
||||
|
||||
if (!IsUnderPostmaster)
|
||||
if (!IsUnderPostmaster || ExecBackend)
|
||||
{
|
||||
if (!potential_DataDir)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.320 2003/05/03 03:52:07 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.321 2003/05/03 05:13:18 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
|
@ -2243,10 +2243,6 @@ BackendFinalize(Port *port)
|
|||
/* Reset MyProcPid to new backend's pid */
|
||||
MyProcPid = getpid();
|
||||
|
||||
#ifdef EXEC_BACKEND
|
||||
read_nondefault_variables();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialize libpq and enable reporting of elog errors to the client.
|
||||
* Must do this now because authentication uses libpq to send
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.330 2003/05/03 03:52:07 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.331 2003/05/03 05:13:20 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
|
@ -1139,9 +1139,12 @@ PostgresMain(int argc, char *argv[], const char *username)
|
|||
Noversion = false;
|
||||
EchoQuery = false;
|
||||
|
||||
if (!IsUnderPostmaster)
|
||||
if (!IsUnderPostmaster || ExecBackend)
|
||||
{
|
||||
InitializeGUCOptions();
|
||||
#ifdef EXEC_BACKEND
|
||||
read_nondefault_variables();
|
||||
#endif
|
||||
potential_DataDir = getenv("PGDATA");
|
||||
}
|
||||
|
||||
|
@ -1676,7 +1679,7 @@ PostgresMain(int argc, char *argv[], const char *username)
|
|||
if (!IsUnderPostmaster)
|
||||
{
|
||||
puts("\nPOSTGRES backend interactive interface ");
|
||||
puts("$Revision: 1.330 $ $Date: 2003/05/03 03:52:07 $\n");
|
||||
puts("$Revision: 1.331 $ $Date: 2003/05/03 05:13:20 $\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue