Re: pg_ctl / SCM interaction

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: pg_ctl / SCM interaction
Date: 2004-05-24 14:53:09
Message-ID: 40B20C55.8090004@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2004-05-24 15:20:29 Re: nightly win32 builds
Previous Message Dave Page 2004-05-24 14:50:01 Re: pg_ctl / SCM interaction