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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-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

Browse pgsql-committers by date

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

Browse pgsql-hackers by date

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