Re: Better detection of staled postmaster.pid - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Better detection of staled postmaster.pid
Date
Msg-id 6100.1441032127@sss.pgh.pa.us
Whole thread Raw
In response to Re: Better detection of staled postmaster.pid  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
Kevin Grittner <kgrittn@ymail.com> writes:
> Pavel Raiskup <praiskup@redhat.com> wrote:
>> It's been reported [1] that postmaster fails to start against staled
>> postmaster.pid after (e.g.) power outage on Fedora,

> Was the other newly started process another PostgreSQL cluster?
> Was it launched under the same OS user?

Yes, that's what the bugzilla report indicated.

> (Those are the only
> conditions under which I've seen this.)  I think it is wise to use
> a separate OS user for each cluster.

That's my recommendation too.  The only other thing you could do to
prevent this would be to manually blow away postmaster.pid files,
and please listen to this: that cure is a lot worse than the disease.
It's almost never implemented safely (that is, in a way that guarantees
the forcible removal can *only* happen at system boot and never later).
        regards, tom lane



pgsql-hackers by date:

Previous
From: "Shulgin, Oleksandr"
Date:
Subject: Re: Adding since-version tags to the docs?
Next
From: Tom Lane
Date:
Subject: Re: Adding since-version tags to the docs?