From e43d51fddcf52e70bc66903aa53c72c8ae39cb2b Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 30 Sep 2001 20:08:18 +0000
Subject: [PATCH] ISTM that IsUnderPostmaster should mean we are a child
 process of the postmaster ... it should not be set in the postmaster itself.

---
 src/backend/postmaster/postmaster.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 40ff1a661b3..85197e957ae 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.243 2001/09/21 20:31:48 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.244 2001/09/30 20:08:18 tgl Exp $
  *
  * NOTES
  *
@@ -312,8 +312,6 @@ PostmasterMain(int argc, char *argv[])
 	char		original_extraoptions[MAXPGPATH];
 	char	   *potential_DataDir = NULL;
 
-	IsUnderPostmaster = true;	/* so that backends know this */
-
 	*original_extraoptions = '\0';
 
 	progname = argv[0];
@@ -1935,6 +1933,8 @@ DoBackend(Port *port)
 	 * Let's clean up ourselves as the postmaster child
 	 */
 
+	IsUnderPostmaster = true;	/* we are a postmaster subprocess now */
+
 	/* We don't want the postmaster's proc_exit() handlers */
 	on_exit_reset();
 
@@ -2317,6 +2317,8 @@ SSDataBase(int xlop)
 		beos_backend_startup();
 #endif
 
+		IsUnderPostmaster = true; /* we are a postmaster subprocess now */
+
 		/* Lose the postmaster's on-exit routines and port connections */
 		on_exit_reset();
 
-- 
GitLab