Commit b916cc43 authored by Tom Lane's avatar Tom Lane

Cause standalone backend (including bootstrap case) to read the GUC

config file if it exists.  This was already discussed as being a good
idea, and now seems the cleanest way to deal with initdb-time failures
on machines with small SHMMAX.  (The submitted patches instead modified
initdb.sh to pass the correct sizing parameters, but that would still
leave standalone backends prone to failure later.  An admin who needs
to use a standalone backend has enough trouble already, he shouldn't
have to manually configure its shmem settings...)
parent d70610c4
...@@ -8,7 +8,7 @@ ...@@ -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.165 2003/08/04 02:39:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.166 2003/09/02 19:04:12 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -368,9 +368,15 @@ BootstrapMain(int argc, char *argv[]) ...@@ -368,9 +368,15 @@ BootstrapMain(int argc, char *argv[])
Assert(DataDir); Assert(DataDir);
ValidatePgVersion(DataDir); ValidatePgVersion(DataDir);
/* Acquire configuration parameters */
if (IsUnderPostmaster)
{
#ifdef EXEC_BACKEND #ifdef EXEC_BACKEND
read_nondefault_variables(); read_nondefault_variables();
#endif #endif
}
else
ProcessConfigFile(PGC_POSTMASTER);
if (IsUnderPostmaster) if (IsUnderPostmaster)
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.361 2003/08/26 15:38:24 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.362 2003/09/02 19:04:12 tgl Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
...@@ -2490,9 +2490,15 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2490,9 +2490,15 @@ PostgresMain(int argc, char *argv[], const char *username)
} }
Assert(DataDir); Assert(DataDir);
/* Acquire configuration parameters */
if (IsUnderPostmaster)
{
#ifdef EXEC_BACKEND #ifdef EXEC_BACKEND
read_nondefault_variables(); read_nondefault_variables();
#endif #endif
}
else
ProcessConfigFile(PGC_POSTMASTER);
/* /*
* Set up signal handlers and masks. * Set up signal handlers and masks.
...@@ -2651,7 +2657,7 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -2651,7 +2657,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.361 $ $Date: 2003/08/26 15:38:24 $\n"); puts("$Revision: 1.362 $ $Date: 2003/09/02 19:04:12 $\n");
} }
/* /*
......
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