Comment out some of the conditional tests until we have exec().
Reorder non-default variable loading until PGDATA is defined.
This commit is contained in:
parent
2cf57c8f8d
commit
77a0219ab1
@ -8,7 +8,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.152 2003/05/03 05:13:18 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.153 2003/05/06 04:16:35 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -236,7 +236,7 @@ BootstrapMain(int argc, char *argv[])
|
|||||||
*
|
*
|
||||||
* If we are running under the postmaster, this is done already.
|
* If we are running under the postmaster, this is done already.
|
||||||
*/
|
*/
|
||||||
if (!IsUnderPostmaster || ExecBackend)
|
if (!IsUnderPostmaster /* when exec || ExecBackend */)
|
||||||
MemoryContextInit();
|
MemoryContextInit();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -245,12 +245,9 @@ BootstrapMain(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Set defaults, to be overriden by explicit options below */
|
/* Set defaults, to be overriden by explicit options below */
|
||||||
dbName = NULL;
|
dbName = NULL;
|
||||||
if (!IsUnderPostmaster || ExecBackend)
|
if (!IsUnderPostmaster /* when exec || ExecBackend*/)
|
||||||
{
|
{
|
||||||
InitializeGUCOptions();
|
InitializeGUCOptions();
|
||||||
#ifdef EXEC_BACKEND
|
|
||||||
read_nondefault_variables();
|
|
||||||
#endif
|
|
||||||
potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA
|
potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA
|
||||||
* variable */
|
* variable */
|
||||||
}
|
}
|
||||||
@ -309,7 +306,7 @@ BootstrapMain(int argc, char *argv[])
|
|||||||
AttachSharedMemoryAndSemaphores();
|
AttachSharedMemoryAndSemaphores();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsUnderPostmaster || ExecBackend)
|
if (!IsUnderPostmaster /* when exec || ExecBackend*/)
|
||||||
{
|
{
|
||||||
if (!potential_DataDir)
|
if (!potential_DataDir)
|
||||||
{
|
{
|
||||||
@ -328,6 +325,10 @@ BootstrapMain(int argc, char *argv[])
|
|||||||
Assert(DataDir);
|
Assert(DataDir);
|
||||||
ValidatePgVersion(DataDir);
|
ValidatePgVersion(DataDir);
|
||||||
|
|
||||||
|
#ifdef EXEC_BACKEND
|
||||||
|
read_nondefault_variables();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (IsUnderPostmaster)
|
if (IsUnderPostmaster)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.333 2003/05/06 00:20:33 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.334 2003/05/06 04:16:35 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
@ -1803,12 +1803,9 @@ PostgresMain(int argc, char *argv[], const char *username)
|
|||||||
Noversion = false;
|
Noversion = false;
|
||||||
EchoQuery = false;
|
EchoQuery = false;
|
||||||
|
|
||||||
if (!IsUnderPostmaster || ExecBackend)
|
if (!IsUnderPostmaster /* when exec || ExecBackend*/)
|
||||||
{
|
{
|
||||||
InitializeGUCOptions();
|
InitializeGUCOptions();
|
||||||
#ifdef EXEC_BACKEND
|
|
||||||
read_nondefault_variables();
|
|
||||||
#endif
|
|
||||||
potential_DataDir = getenv("PGDATA");
|
potential_DataDir = getenv("PGDATA");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2182,6 +2179,10 @@ PostgresMain(int argc, char *argv[], const char *username)
|
|||||||
}
|
}
|
||||||
Assert(DataDir);
|
Assert(DataDir);
|
||||||
|
|
||||||
|
#ifdef EXEC_BACKEND
|
||||||
|
read_nondefault_variables();
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up signal handlers and masks.
|
* Set up signal handlers and masks.
|
||||||
*
|
*
|
||||||
@ -2343,7 +2344,7 @@ PostgresMain(int argc, char *argv[], const char *username)
|
|||||||
if (!IsUnderPostmaster)
|
if (!IsUnderPostmaster)
|
||||||
{
|
{
|
||||||
puts("\nPOSTGRES backend interactive interface ");
|
puts("\nPOSTGRES backend interactive interface ");
|
||||||
puts("$Revision: 1.333 $ $Date: 2003/05/06 00:20:33 $\n");
|
puts("$Revision: 1.334 $ $Date: 2003/05/06 04:16:35 $\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user