Re: server auto-restarts and ipcs - Mailing list pgsql-general

From Tom Lane
Subject Re: server auto-restarts and ipcs
Date
Msg-id 6417.1100043334@sss.pgh.pa.us
Whole thread Raw
In response to Re: server auto-restarts and ipcs  ("Ed L." <pgsql@bluepolka.net>)
Responses Re: server auto-restarts and ipcs
List pgsql-general
"Ed L." <pgsql@bluepolka.net> writes:
> I noticed that ipcs on my linux box has a command-line option to list the
> pid that created the segment.  Not sure if such a library exists in usable
> form, but looking for segments owned by the downed postmaster's pid would
> seem to be what is needed.  Just a thought...

[ thinks about it... ]  Nah, it's still not bulletproof, because in a
system reboot situation you can't trust the old PID either.  It could
easy be that the other guy gets both the PID and the shmem ID that
belonged to you last time.

I've committed changes for 8.0 that mark a shmem segment with the inode
of the associated data directory; that should be a stable enough ID to
handle all routine-reboot cases.  (If you had to restore your whole
filesystem from backup tapes, it might be wrong, but you're going to be
doing such recovery manually anyway ...)

            regards, tom lane

pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: Re: server auto-restarts and ipcs
Next
From: David Wheeler
Date:
Subject: ANNOUNCE: Bricolage 1.8.3