RE: pgsql/src/backend/postmaster (postmaster.c)
От | Hiroshi Inoue |
---|---|
Тема | RE: pgsql/src/backend/postmaster (postmaster.c) |
Дата | |
Msg-id | 000401bfe4a6$edf195c0$2801007e@tpf.co.jp обсуждение исходный текст |
Ответ на | Re: pgsql/src/backend/postmaster (postmaster.c) (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pgsql/src/backend/postmaster (postmaster.c)
|
Список | pgsql-committers |
> -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > > "Hiroshi Inoue" <Inoue@tpf.co.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(); +
В списке pgsql-committers по дате отправления: