Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DBDF02E34D1 for ; Wed, 16 Jan 2008 13:10:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 62699-01-9 for ; Wed, 16 Jan 2008 13:09:58 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 11B842E3003 for ; Wed, 16 Jan 2008 13:09:56 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m0GH9tHP025136; Wed, 16 Jan 2008 12:09:56 -0500 (EST) To: Mischa Sandberg cc: pgsql-hackers@postgresql.org Subject: Re: postgresql in FreeBSD jails: proposal In-reply-to: <1200501702.478e33c61b74e@webmail.telus.net> References: <1200501702.478e33c61b74e@webmail.telus.net> Comments: In-reply-to Mischa Sandberg message dated "Wed, 16 Jan 2008 08:41:42 -0800" Date: Wed, 16 Jan 2008 12:09:55 -0500 Message-ID: <25135.1200503395@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/659 X-Sequence-Number: 112933 Mischa Sandberg writes: > + /* In a FreeBSD jail, you can't "kill -0" a postmaster > + * running in a different jail, so the shm seg might > + * still be in use. Safer to test nattch ? > + */ > + if (kill(1,0) && errno == ESRCH && !PGSharedMemoryIsInUse(0,NextShmSegID)) > + continue; Isn't the last part of that test backward? If it isn't, I don't understand what it's for at all. regards, tom lane