From owner-freebsd-stable@FreeBSD.ORG Tue Apr 26 16:56:47 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D719D16A4CE for ; Tue, 26 Apr 2005 16:56:47 +0000 (GMT) Received: from hub.org (hub.org [200.46.204.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0551943D46 for ; Tue, 26 Apr 2005 16:56:47 +0000 (GMT) (envelope-from scrappy@hub.org) Received: from localhost (unknown [200.46.204.144]) by hub.org (Postfix) with ESMTP id 4D1821298FB; Tue, 26 Apr 2005 13:56:45 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53264-06; Tue, 26 Apr 2005 16:56:45 +0000 (GMT) Received: from ganymede.hub.org (blk-222-82-167.eastlink.ca [24.222.82.167]) by hub.org (Postfix) with ESMTP id A219F12931D; Tue, 26 Apr 2005 13:56:44 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 877D03A171; Tue, 26 Apr 2005 13:56:44 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 85DA236EFD; Tue, 26 Apr 2005 13:56:44 -0300 (ADT) Date: Tue, 26 Apr 2005 13:56:44 -0300 (ADT) From: "Marc G. Fournier" To: Bill Moran In-Reply-To: <20050426110923.3edf8a2e.wmoran@potentialtech.com> Message-ID: <20050426135528.R32711@ganymede.hub.org> References: <426E5713.3010906@eurocom.od.ua> <20050426110923.3edf8a2e.wmoran@potentialtech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org cc: Alexander Rusinov cc: freebsd-stable@freebsd.org Subject: Re: PostgreSQL in FreeBSD jails X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2005 16:56:48 -0000 On Tue, 26 Apr 2005, Bill Moran wrote: > Alexander Rusinov wrote: >> Hi, >> >> I need to run a number of PostgreSQL servers in different FreeBSD jails. >> I managed to run a first instance of PostgreSQL server in a jail, but >> after I launch a new server in another jail the first one starts to >> return an error messages like the following: >> >> semctl(1507328, 4, SETVAL, 0) failed: Invalid argument >> >> The problem in general is: only one instance of PostgreSQL server >> processes clients' connections, all of the others return semctl errors. > > I had this exact same problem. I never found a solution. The cause > appears to be that, since shared memory is not segregated between jails, > the newly launched Postgres instances corrupt the shared memory of > previously running Postgres instances. I'm running 9 jails on a server right now, each with their own instance: # ps aux | grep postmaster|grep -- -D scrappy 20043 0.0 0.0 18856 504 ?? SsJ Thu08PM 0:58.55 /usr/local/bin/postmaster -D /usr/local/pgsql/data -S (postgres) pgsql 39126 0.0 0.0 7480 400 ?? SsJ 19Apr05 0:00.99 /usr/local/bin/postmaster -D /usr/local/pgsql/data (postgres) pgsql 38868 0.0 0.0 8224 552 ?? SsJ 19Apr05 0:02.08 /usr/local/bin/postmaster -D /usr/local/pgsql/data (postgres) pgsql 37375 0.0 0.0 7180 404 ?? SsJ 19Apr05 0:02.47 /usr/local/bin/postmaster -D /usr/local/pgsql/data (postgres) scrappy 36865 0.0 0.0 16556 744 ?? SsJ 19Apr05 0:08.32 /usr/local/bin/postmaster -D /usr/local/pgsql/data -S (postgres) scrappy 36675 0.0 0.0 258184 1000 ?? SsJ 19Apr05 7:29.85 /usr/local/bin/postmaster -D /usr/local/pgsql/data -S (postgres) scrappy 36569 0.0 0.0 14552 596 ?? SsJ 19Apr05 0:12.27 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data -S (postgres) scrappy 35961 0.0 0.0 16624 580 ?? SsJ 19Apr05 12:26.68 /usr/local/bin/postmaster -D /usr/local/pgsql/data -S (postgres) scrappy 54328 0.0 0.0 258248 1596 ?? SJ 1:55PM 0:00.00 /usr/local/bin/postmaster -D /usr/local/pgsql/data -S (postgres) and never noticed any issues ... but, this is with 4.11, not 5.x, so maybe something has changed? Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664