Re: Service reboot leaves postmaster.pid - Mailing list pgsql-cygwin

From Dmitry Yurtaev
Subject Re: Service reboot leaves postmaster.pid
Date
Msg-id 002001c0f685$20658020$0107a8c0@SULACO
Whole thread Raw
In response to RE: Service reboot leaves postmaster.pid  ("Henshall, Stuart - WCP" <SHenshall@westcountrypublications.co.uk>)
Responses Re: Service reboot leaves postmaster.pid
List pgsql-cygwin
> Note that someone else on the Cygwin email list reports occasional
> problems where cygrunsrv completely fails to start after NT restart.
> In their case they're using it for sshd, not postgres, but even so I'm
> somewhat concerned that cygrunsrv may have some timing-related
> initialization problem.

with your patch applied to 0.93-1 postmaster gets a signal and shuts down
properly. but after reboot it fails to start anyway. SCM writes error event
saying "Timeout (30000 milliseconds) waiting for the Cygwin PostgreSQL
Server service to connect". i've tried to track down a problem, but for me
it looks like that cygrunsrv isn't executing at all! (maybe i'm wrong, but

log = fopen("/svclog.txt", "w"); fprintf(log, "main %d\n", logcnt++);
fflush(log);

 in the beginning of main() does nothing after reboot. when service is
started manually, it works fine) nevertheless i can see cygrunsrv.exe
process in task manager. but it gets killed before i can attach a debugger
to see what's it doing...

/Dmitry

P.S. 4 hunks of your patch get rejected against 0.93-1 - it doesn't have
'dir' args in reg manipulation functions.


pgsql-cygwin by date:

Previous
From: Fred Yankowski
Date:
Subject: cygrunsrv patch for system shutdown handling
Next
From: Fred Yankowski
Date:
Subject: Re: Service reboot leaves postmaster.pid