1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Review uses of IsUnderPostmaster, change some tests to look at

whereToSendOutput instead because they are really inquiring about
the correct client communication protocol.  Update some comments.
This is pointing towards supporting regular FE/BE client protocol
in a standalone backend, per discussion a month or so back.
This commit is contained in:
Tom Lane
2004-01-28 21:02:40 +00:00
parent b3ead7c045
commit 2f0d43b251
8 changed files with 51 additions and 26 deletions

View File

@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.363 2004/01/27 00:45:26 momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.364 2004/01/28 21:02:40 tgl Exp $
*
* NOTES
*
@@ -2697,6 +2697,10 @@ SubPostmasterMain(int argc, char* argv[])
/* Do this sooner rather than later... */
IsUnderPostmaster = true; /* we are a postmaster subprocess now */
/* In EXEC case we will not have inherited these settings */
IsPostmasterEnvironment = true;
whereToSendOutput = None;
/* Setup global context */
MemoryContextInit();
InitializeGUCOptions();
@@ -2994,6 +2998,14 @@ SSDataBaseInit(int xlop)
IsUnderPostmaster = true; /* we are a postmaster subprocess
* now */
#ifdef EXEC_BACKEND
/* In EXEC case we will not have inherited these settings */
IsPostmasterEnvironment = true;
whereToSendOutput = None;
#endif
MyProcPid = getpid(); /* reset MyProcPid */
/* Lose the postmaster's on-exit routines and port connections */
on_exit_reset();