RE: Service reboot leaves postmaster.pid

From: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
To: "'Fred Yankowski'" <fred(at)ontosys(dot)com>
Cc: "'pgsql-cygwin(at)postgresql(dot)org'" <pgsql-cygwin(at)postgresql(dot)org>
Subject: RE: Service reboot leaves postmaster.pid
Date: 2001-06-15 07:53:33
Message-ID: E2870D8CE1CCD311BAF50008C71EDE8E01F745EB@MAIL_EXCHANGE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

Thanks for the info, do you have a patch for ignoring SIGHUP? If not I guess
it'll be time to delve into the source :).
- Stuart

> -----Original Message-----
> From: Fred Yankowski [SMTP:fred(at)ontosys(dot)com]
> Sent: Thursday, June 14, 2001 4:28 PM
> To: Henshall, Stuart - WCP
> Cc: 'pgsql-cygwin(at)postgresql(dot)org'
> Subject: Re: [CYGWIN] Service reboot leaves postmaster.pid
>
> 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(at)OntoSys(dot)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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Henshall, Stuart - WCP 2001-06-15 10:49:19 RE: Invalid Current Euid 500
Previous Message S. L. 2001-06-15 06:29:12 Re: Why cant I load Pg module from my perl CGI under IIS?