Re: postgresql in FreeBSD jails: proposal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: postgresql in FreeBSD jails: proposal
Date
Msg-id 25481.1200504812@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgresql in FreeBSD jails: proposal  (Mischa Sandberg <mischa_sandberg@telus.net>)
List pgsql-hackers
Mischa Sandberg <mischa_sandberg@telus.net> writes:
> Quoting Tom Lane <tgl@sss.pgh.pa.us>:
>> Mischa Sandberg <mischa_sandberg@telus.net> writes:
>>> +               if (kill(1,0) && errno == ESRCH && PGSharedMemoryIsInUse(0,NextShmemSegID))
>>> +                       continue;
>> 
>> Isn't the last part of that test backward?  If it isn't, I don't
>> understand what it's for at all.

> Serious blush here. Yes.

Actually, after re-reading what PGSharedMemoryIsInUse does, I don't
think you want to use it: it goes to considerable lengths to avoid
returning a false positive, whereas in this context I believe we
*do* need to avoid segments that belong to other data directories.
So you probably need a separate chunk of code that only does the
nattch test.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Guillaume Smet"
Date:
Subject: Re: Some ideas about Vacuum
Next
From: Greg Smith
Date:
Subject: Re: Some ideas about Vacuum