Re: restarting after power outage - Mailing list pgsql-general

From Tom Lane
Subject Re: restarting after power outage
Date
Msg-id 27143.1114627648@sss.pgh.pa.us
Whole thread Raw
In response to Re: restarting after power outage  (Jon Lapham <lapham@jandr.org>)
Responses Re: restarting after power outage  (Jon Lapham <lapham@jandr.org>)
Re: restarting after power outage  (Doug McNaught <doug@mcnaught.org>)
List pgsql-general
Jon Lapham <lapham@jandr.org> writes:
> Tom Lane wrote:
>> It is.  We have been fooling with the postmaster startup logic to try to
>> eliminate this gotcha, but it's only very recently (8.0.2) that I think
>> we got it right.

> So, then it would be correct to change my init scripts to do the
> following:  (if so, this patch can be applied to the 7.4 branch)

I would recommend strongly AGAINST that, because what you just did was
remove the defense against starting two postmasters concurrently in the
same data directory (which would be a disaster of the first magnitude).
This is not a problem for bootup of course, but if you ever use this
script to start the postmaster by hand, then you are playing with fire.

We would have put something like that in the standard init scripts
years ago if it were safe.

If you want a solution in the 7.4 branch, I have back-patched the
8.0.2 fix into the latest Fedora Core 3 RPMs (7.4.7-5.FC3.1).

            regards, tom lane

pgsql-general by date:

Previous
From: Jon Lapham
Date:
Subject: Re: restarting after power outage
Next
From: Jon Lapham
Date:
Subject: Re: restarting after power outage