> -----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 Lane | Date: 2000-07-03 04:32:22 |
| Subject: Re: pgsql/src/backend/postmaster (postmaster.c) |
| Previous: | From: Tom Lane | Date: 2000-07-03 03:59:51 |
| Subject: Re: pgsql/src/backend/postmaster (postmaster.c) |
pgsql-committers by date
| Next: | From: Tom Lane | Date: 2000-07-03 04:32:22 |
| Subject: Re: pgsql/src/backend/postmaster (postmaster.c) |
| Previous: | From: Tom Lane | Date: 2000-07-03 03:59:51 |
| Subject: Re: pgsql/src/backend/postmaster (postmaster.c) |