Re: postgresql in FreeBSD jails: proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mischa Sandberg <mischa_sandberg(at)telus(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgresql in FreeBSD jails: proposal
Date: 2008-01-16 17:33:32
Message-ID: 25481.1200504812@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-bugs pgsql-committers pgsql-general pgsql-hackers pgsql-jdbc pgsql-odbc pgsql-patches

Mischa Sandberg <mischa_sandberg(at)telus(dot)net> writes:
> Quoting Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> Mischa Sandberg <mischa_sandberg(at)telus(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Arthurs 2008-01-16 17:42:44 Re: Backup of live database
Previous Message David Wall 2008-01-16 17:28:42 Re: Backup of live database

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2008-01-16 17:50:41 Re: postgresql in FreeBSD jails: proposal
Previous Message Mischa Sandberg 2008-01-16 17:13:23 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2008-01-16 17:50:41 Re: postgresql in FreeBSD jails: proposal
Previous Message Mischa Sandberg 2008-01-16 17:13:23 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2008-01-16 17:50:41 Re: postgresql in FreeBSD jails: proposal
Previous Message Mischa Sandberg 2008-01-16 17:13:23 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2008-01-16 17:40:23 Re: Some ideas about Vacuum
Previous Message Guillaume Smet 2008-01-16 17:32:37 Re: Some ideas about Vacuum

Browse pgsql-jdbc by date

  From Date Subject
Next Message Stephen Frost 2008-01-16 17:50:41 Re: postgresql in FreeBSD jails: proposal
Previous Message Mischa Sandberg 2008-01-16 17:13:23 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-odbc by date

  From Date Subject
Next Message Stephen Frost 2008-01-16 17:50:41 Re: postgresql in FreeBSD jails: proposal
Previous Message Mischa Sandberg 2008-01-16 17:13:23 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-patches by date

  From Date Subject
Next Message Stephen Frost 2008-01-16 17:50:41 Re: postgresql in FreeBSD jails: proposal
Previous Message Mischa Sandberg 2008-01-16 17:13:23 Re: postgresql in FreeBSD jails: proposal