On Wed, Jun 1, 2011 at 12:30 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> To address this corner >> case, we should check whether postmaster is really running by sending >> the signal 0 after we read postmater.pid file? Attached patch does that. > > I find myself unimpressed by this approach, because it supposes that the > postmaster got as far as creating postmaster.pid.
Sorry, I could not understand the reason why you were unimpressed. Could you explain it in a little more detail? > My preference for fixing this would be to arrange for the postmaster to > be the direct child of pg_ctl, so that we could watch for SIGCHLD to > detect premature postmaster exit. Right now that doesn't work because > we are invoking an intermediate shell via system(), but I think that > could be avoided with a bit more effort (ie, an explicit fork and exec). > Not sure how that all translates into Windows-ville, though. Yeah, it sounds difficult to implement that for Windows. pg_ctl might need to invoke the thread for receiving the SIGCHLD, like the server does. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers