Skip site navigation (1) Skip section navigation (2)

RE: pgsql/src/backend/postmaster (postmaster.c)

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-committers(at)postgresql(dot)org>
Subject: RE: pgsql/src/backend/postmaster (postmaster.c)
Date: 2000-07-03 04:26:59
Message-ID: 000401bfe4a6$edf195c0$2801007e@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> 
> "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> > PGPORT environment variable is ignored again.
> > PostPortName seems to be reset in ResetAllOptions().
> 
> Think you want to complain to Peter, not me.  I haven't been touching
> any options-handling code...
>

Seems you have changed the position of ResetAllOptions() as follows.

@@ -378,15 +378,38 @@
 	 */
 	umask((mode_t) 0077);
 
-	ResetAllOptions();
-
 	MyProcPid = getpid();
+
+	/*
+	 * Fire up essential subsystems: error and memory management
+	 */
+	EnableExceptionHandling(true);
+	MemoryContextInit();
+
+	/*
+	 * By default, palloc() requests in the postmaster will be allocated
+	 * in the PostmasterContext, which is space that can be recycled by
+	 * backends.  Allocated data that needs to be available to backends
+	 * should be allocated in TopMemoryContext.
+	 */
+	PostmasterContext = AllocSetContextCreate(TopMemoryContext,
+											  "Postmaster",
+											  ALLOCSET_DEFAULT_MINSIZE,
+											  ALLOCSET_DEFAULT_INITSIZE,
+											  ALLOCSET_DEFAULT_MAXSIZE);
+	MemoryContextSwitchTo(PostmasterContext);
+
+	/*
+	 * Options setup
+	 */
 	if (getenv("PGDATA"))
 		DataDir = strdup(getenv("PGDATA")); /* default value */
 
 	if (getenv("PGPORT"))
 		PostPortName = atoi(getenv("PGPORT"));
 
+	ResetAllOptions();
+


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-07-03 04:32:22
Subject: Re: pgsql/src/backend/postmaster (postmaster.c)
Previous:From: Tom LaneDate: 2000-07-03 03:59:51
Subject: Re: pgsql/src/backend/postmaster (postmaster.c)

pgsql-committers by date

Next:From: Tom LaneDate: 2000-07-03 04:32:22
Subject: Re: pgsql/src/backend/postmaster (postmaster.c)
Previous:From: Tom LaneDate: 2000-07-03 03:59:51
Subject: Re: pgsql/src/backend/postmaster (postmaster.c)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group