Cleanup of fork/exec - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Cleanup of fork/exec |
Date | |
Msg-id | 200305060413.h464D6C09530@candle.pha.pa.us Whole thread Raw |
List | pgsql-patches |
I have applied this patch to comment out some of the new code until we start doing exec(), and re-order the non-default variable loading so PGDATA is defined. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: src/backend/bootstrap/bootstrap.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/bootstrap/bootstrap.c,v retrieving revision 1.152 diff -c -c -r1.152 bootstrap.c *** src/backend/bootstrap/bootstrap.c 3 May 2003 05:13:18 -0000 1.152 --- src/backend/bootstrap/bootstrap.c 6 May 2003 04:11:29 -0000 *************** *** 236,242 **** * * If we are running under the postmaster, this is done already. */ ! if (!IsUnderPostmaster || ExecBackend) MemoryContextInit(); /* --- 236,242 ---- * * If we are running under the postmaster, this is done already. */ ! if (!IsUnderPostmaster /* when exec || ExecBackend */) MemoryContextInit(); /* *************** *** 245,256 **** /* Set defaults, to be overriden by explicit options below */ dbName = NULL; ! if (!IsUnderPostmaster || ExecBackend) { InitializeGUCOptions(); - #ifdef EXEC_BACKEND - read_nondefault_variables(); - #endif potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA * variable */ } --- 245,253 ---- /* Set defaults, to be overriden by explicit options below */ dbName = NULL; ! if (!IsUnderPostmaster /* when exec || ExecBackend*/) { InitializeGUCOptions(); potential_DataDir = getenv("PGDATA"); /* Null if no PGDATA * variable */ } *************** *** 309,315 **** AttachSharedMemoryAndSemaphores(); } ! if (!IsUnderPostmaster || ExecBackend) { if (!potential_DataDir) { --- 306,312 ---- AttachSharedMemoryAndSemaphores(); } ! if (!IsUnderPostmaster /* when exec || ExecBackend*/) { if (!potential_DataDir) { *************** *** 327,332 **** --- 324,333 ---- /* Validate we have been given a reasonable-looking DataDir */ Assert(DataDir); ValidatePgVersion(DataDir); + + #ifdef EXEC_BACKEND + read_nondefault_variables(); + #endif if (IsUnderPostmaster) { Index: src/backend/tcop/postgres.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/tcop/postgres.c,v retrieving revision 1.331 diff -c -c -r1.331 postgres.c *** src/backend/tcop/postgres.c 3 May 2003 05:13:20 -0000 1.331 --- src/backend/tcop/postgres.c 6 May 2003 04:11:38 -0000 *************** *** 1139,1150 **** Noversion = false; EchoQuery = false; ! if (!IsUnderPostmaster || ExecBackend) { InitializeGUCOptions(); - #ifdef EXEC_BACKEND - read_nondefault_variables(); - #endif potential_DataDir = getenv("PGDATA"); } --- 1139,1147 ---- Noversion = false; EchoQuery = false; ! if (!IsUnderPostmaster /* when exec || ExecBackend*/) { InitializeGUCOptions(); potential_DataDir = getenv("PGDATA"); } *************** *** 1517,1522 **** --- 1514,1523 ---- SetDataDir(potential_DataDir); } Assert(DataDir); + + #ifdef EXEC_BACKEND + read_nondefault_variables(); + #endif /* * Set up signal handlers and masks.
pgsql-patches by date: