Re: pg_ctl / SCM interaction - Mailing list pgsql-hackers-win32

From Andrew Dunstan
Subject Re: pg_ctl / SCM interaction
Date
Msg-id 40B20C55.8090004@dunslane.net
Whole thread Raw
In response to Re: pg_ctl / SCM interaction  ("Magnus Hagander" <mha@sollentuna.net>)
List 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 by date:

Previous
From: "Dave Page"
Date:
Subject: Re: pg_ctl / SCM interaction
Next
From: Bruce Momjian
Date:
Subject: Re: nightly win32 builds