Re: Service reboot leaves postmaster.pid
От | Fred Yankowski |
---|---|
Тема | Re: Service reboot leaves postmaster.pid |
Дата | |
Msg-id | 20010614102751.A70357@enteract.com обсуждение исходный текст |
Ответ на | Service reboot leaves postmaster.pid ("Henshall, Stuart - WCP" <SHenshall@westcountrypublications.co.uk>) |
Список | pgsql-cygwin |
I've seen this same problem when using a patched version of postmaster that directly incorporates the service-management functions also provided by cygrunsrv. I eventually got around the problem by changing the postmaster and postgres code to ignore the SIGHUP signal. SIGHUP normally causes postmaster to reread its configuration file. Unfortunately, cygwin code linked into postmaster catches a window-shutdown event during NT shutdown and sends a SIGHUP signal to its own process, causing postmaster to start up its process of rereading the config file. Something about this coincidence causes postmaster to end up in the state where postmaster.pid is still around after restart. I suspect that the reconfiguration process hangs or is aborted during shutdown. I'm planning to submit a patch to cygrunsrv that will give it an optional feature to notice the event of NT shutdown and send a signal to the managed process, much as is done for a manual stop with the '--termsig' option. This will allow us to do the equivalent of 'pg_ctl -m fast stop' or 'pg_ctl -m immediate stop' at that time. But my experiences with a prototype suggest that it's still necessary to ignore SIGHUP in postmaster and postgres in that case because SIGHUP can otherwise still interfere with shutdown. On Thu, Jun 14, 2001 at 01:16:00PM +0100, Henshall, Stuart - WCP wrote: > I'm running the postmaster as a service using cygrunsrv and this > seems to go fine apart from when I reboot it doesn't seem to remove the > postmaster.pid file, meaning it fails to start automatically after reboot. -- Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA
В списке pgsql-cygwin по дате отправления: