Re: Feature: POSIX Shared memory support - Mailing list pgsql-patches

From Tom Lane
Subject Re: Feature: POSIX Shared memory support
Date
Msg-id 18001.1170787680@sss.pgh.pa.us
Whole thread Raw
In response to Re: Feature: POSIX Shared memory support  (Chris Marcellino <maps@levelview.com>)
Responses Re: Feature: POSIX Shared memory support
List pgsql-patches
Chris Marcellino <maps@levelview.com> writes:
> I was actually referring to the check that the current SysV code does
> on the pid that is stored in the shmem header. I presume that if the
> backend is dead, the kill(hdr->creatorPID, 0) returning zero would
> suffice for confirming the existence of the other backend process.

No, that's not relevant, because only the postmaster's PID will be there
--- that test is actually more or less redundant with the existing
postmaster.pid lockfile checks.  The thing that the SysV attachment
count is useful for is detecting whether there are orphaned backends
still alive in the database (and potentially changing it, hence the
danger).

We've speculated on occasion about using file locking in some form as a
substitute mechanism for detecting this, but that seems to just bring
its own set of not-too-portable assumptions.

            regards, tom lane

pgsql-patches by date:

Previous
From: Chris Marcellino
Date:
Subject: Re: Feature: POSIX Shared memory support
Next
From: Gregory Stark
Date:
Subject: WIP: Recursive Queries