Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers-win32 by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group