Re: pg_ctl / SCM interaction

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pg_ctl / SCM interaction
Дата
Msg-id 40B20C55.8090004@dunslane.net
обсуждение исходный текст
Ответ на Re: pg_ctl / SCM interaction  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-hackers-win32
Magnus Hagander wrote:

>>Now we use pg_ctl restart. It sends, say, TERM to process Y.
>>I presume
>>process X notices that Process Y has gone away, and registers
>>that the
>>service is stopped. Then pg_ctl starts another postmaster. How does
>>process X know that the new postmaster is its replacement process for
>>process X?
>>
>>
>
>It doesn't. You can't do a restart that way. pg_ctl would either have to
>send some kind of signal to the wrapper process, or use the SCM to
>restart it.
>
>I didn't think of restart when I said what I did - I was thinking
>reload. *that* can be handled the same way.
>
>
>
>

Aha. Source of confusion found :-) . OK, then we have some work to do.
How about if the SCM interaction code writes out a file in the data dir
when the service is started ("pgservice.pid"?) and removes it when the
service is stopped? If this is found then pg_ctl will do a start/restart
by calling "net start".

cheers

andrew.

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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: pg_ctl / SCM interaction
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: nightly win32 builds