Re: Feature: POSIX Shared memory support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Marcellino <maps(at)levelview(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Michael Paesold <mpaesold(at)gmx(dot)at>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Feature: POSIX Shared memory support
Date: 2007-02-06 18:48:00
Message-ID: 18001.1170787680@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Chris Marcellino <maps(at)levelview(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-02-07 00:16:41 WIP: Recursive Queries
Previous Message Chris Marcellino 2007-02-06 18:37:23 Re: Feature: POSIX Shared memory support