Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6E7D72E021D for ; Thu, 17 Jan 2008 02:18:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 13707-09 for ; Thu, 17 Jan 2008 02:18:44 -0400 (AST) Received: from hub.org (hub.org [200.46.204.220]) by postgresql.org (Postfix) with ESMTP id 1D1A82E01E7 for ; Thu, 17 Jan 2008 02:18:46 -0400 (AST) Received: from localhost (unknown [200.46.204.183]) by hub.org (Postfix) with ESMTP id 12AA211FDD31 for ; Thu, 17 Jan 2008 02:18:46 -0400 (AST) Received: from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25929-01; Thu, 17 Jan 2008 02:18:42 -0400 (AST) Received: from fserv.hub.org (blk-7-245-234.eastlink.ca [71.7.245.234]) by hub.org (Postfix) with ESMTP id 5687B11FDD12; Thu, 17 Jan 2008 02:18:42 -0400 (AST) Received: from [192.168.1.2] (unknown [192.168.1.2]) by fserv.hub.org (Postfix) with ESMTP id A902E8B9F9; Thu, 17 Jan 2008 02:18:42 -0400 (AST) Date: Thu, 17 Jan 2008 02:17:53 -0400 From: "Marc G. Fournier" To: Tom Lane cc: pgsql-hackers@postgreSQL.org Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal Message-ID: In-Reply-To: <4089.1200550374@sss.pgh.pa.us> References: <1200501702.478e33c61b74e@webmail.telus.net> <4089.1200550374@sss.pgh.pa.us> X-Mailer: Mulberry/4.0.8 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/687 X-Sequence-Number: 112961 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - --On Thursday, January 17, 2008 01:12:54 -0500 Tom Lane wrote: > "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. No arguments here, just pointing out that changing PGPORT isn't/wasnt' the only way of addressing this problem ... if we can do something more 'internal', it would definitely make life alot easier ... - ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email . scrappy@hub.org MSN . scrappy@hub.org Yahoo . yscrappy Skype: hub.org ICQ . 7615664 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHjvMR4QvfyHIvDvMRAjJuAKCAYGkyvDOMkA6wqeQ7nAqoA1mkRQCdG+5n aD1uG+zUtevdJGJ3BsqeDAs= =Y0DY -----END PGP SIGNATURE-----