Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 365212E00E5 for ; Thu, 17 Jan 2008 02:12:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 25609-03 for ; Thu, 17 Jan 2008 02:12:55 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7E7F32E005D for ; Thu, 17 Jan 2008 02:12: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 m0H6CsTk004090; Thu, 17 Jan 2008 01:12:54 -0500 (EST) To: "Marc G. Fournier" cc: pgsql-hackers@postgreSQL.org Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal In-reply-to: References: <1200501702.478e33c61b74e@webmail.telus.net> Comments: In-reply-to "Marc G. Fournier" message dated "Thu, 17 Jan 2008 05:52:50 +0000" Date: Thu, 17 Jan 2008 01:12:54 -0500 Message-ID: <4089.1200550374@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/686 X-Sequence-Number: 112960 "Marc G. Fournier" writes: > mischa_sandberg@telus.net (Mischa Sandberg) writes: >> Unfortunately, with multiple jails running PG servers and (due to app >> limitations) all servers having same PGPORT, you get the situation that >> when jail#2 (,jail#3,...) server comes up, it: >> - detects that there is a shm seg with ipc key 5432001 >> - checks whether the associated postmaster process exists (with kill -0) >> - overwrites the segment created and being used by jail #1 > Easiest fix: change the UID of the user running the postmaster (ie. pgsql) so > that each runs as a distinct UID (instead of distinct PGPORT) ... been doing > this since moving to FreeBSD 6.x ... no patches required ... Sure, but in the spirit of "belt and suspenders too", I'd think that doing that *and* something like Mischa's proposal wouldn't be bad. (BTW, as far as I saw the original post only went to -hackers ... there's something messed up about your reply.) regards, tom lane