From: | Chris Marcellino <maps(at)levelview(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Michael Paesold <mpaesold(at)gmx(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Feature: POSIX Shared memory support |
Date: | 2007-02-06 18:37:23 |
Message-ID: | D0B4C616-6EF9-44D4-839E-417E81F90278@levelview.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
To my knowledge there is unfortunately not a portable call that does
that.
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.
Chris Marcellino
On Feb 6, 2007, at 10:32 AM, Alvaro Herrera wrote:
> Chris Marcellino wrote:
>> Tom, that is a definitely valid point and thanks for the feedback. I
>> assume that the 'more modern' string segment naming gave the POSIX
>> methods an edge in avoiding collision between other apps.
>> As far as detecting a) whether anyone else is currently attached to
>> that segment and b) whether an earlier existence of the current
>> backend was still attached to a segment, I presumed that checking the
>> pid's of the backend that owns the shared memory segment and checking
>> the data directory (both which the SysV code already does) would
>> suffice?
>
> Is there an API call to list all PIDs that are connected to a
> particular
> segment?
>
> --
> Alvaro Herrera http://
> www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-06 18:48:00 | Re: Feature: POSIX Shared memory support |
Previous Message | Alvaro Herrera | 2007-02-06 18:32:18 | Re: Feature: POSIX Shared memory support |