Re: [HACKERS] postmaster.pid

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: [HACKERS] postmaster.pid
Дата
Msg-id 19991203165614N.t-ishii@sra.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] postmaster.pid  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [HACKERS] postmaster.pid  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
> > I have committed changes to postmaster.c. Now it creates a file called
> > "postmaster.pid" under $PGDATA, which holds postmaster's process
> > id. If the file has already existed, postmaster won't start. So we
> > cannot start more than on postmaster with same $PGDATA any more. I
> > believe it's a good thing. The file will be deleted upon postmaster
> > shutting down.
> 
> I assume you do a kill(0) on the pid if the file exists on startup to
> check to see if the pid is still valid?

A little bit different.

1) if the port is already in use, postmaster exits (same as before)

2) if it fails to create pid file, call
ExitPostmaster(1). ExitPostmaster calls proc_exit() and proc_exit
calls exit().
--
Tatsuo Ishii



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] postmaster.pid
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] postmaster.pid