Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 128742E00E5; Thu, 17 Jan 2008 01:56:50 -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 21476-01-9; Thu, 17 Jan 2008 01:56:39 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 8B0812E42AC; Thu, 17 Jan 2008 01:54:14 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id m0H5sBVD018424; Thu, 17 Jan 2008 01:54:13 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id m0H5qpUD018169; Thu, 17 Jan 2008 01:52:51 -0400 (AST) (envelope-from news) From: "Marc G. Fournier" X-Newsgroups: pgsql.hackers Subject: Re: postgresql in FreeBSD jails: proposal Date: Thu, 17 Jan 2008 05:52:50 +0000 (UTC) Organization: Hub.Org Networking Services Lines: 17 Message-ID: References: <1200501702.478e33c61b74e@webmail.telus.net> X-Complaints-To: usenet@news.hub.org User-Agent: nn/6.7.3 To: pgadmin-devteam@postgresql.org.pgadmin-hackers@postgresql.org.pgadmin-support@postgresql.org.pgsql-admin@postgresql.org.pgsql-advocacy@postgresql.org.pgsql-announce@postgresql.org.pgsql-benchmarks@postgresql.org.pgsql-bugs@postgresql.org.pgsql-chat@postg X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/198 X-Sequence-Number: 27972 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 ... -- ---- 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