Date: Tue, 03 May 2005 08:07:45 +0200 From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) To: "Marc G. Fournier" <scrappy@hub.org> Cc: freebsd-stable@freebsd.org Subject: Re: PostgreSQL in FreeBSD jails Message-ID: <86psw84zbi.fsf@xps.des.no> In-Reply-To: <20050502180152.I53065@ganymede.hub.org> References: <426E5713.3010906@eurocom.od.ua> <747dc8f30504260812ee3c47e@mail.gmail.com> <426E5EA5.8000703@eurocom.od.ua> <426F3AFA.9020900@konvergencia.hu> <426F5A6E.4050208@eurocom.od.ua> <86acndmyky.fsf@xps.des.no> <4276910A.3040100@criticalmagic.com> <20050502180152.I53065@ganymede.hub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"Marc G. Fournier" <scrappy@hub.org> writes: > You've all lost me here ... what exactly is the problem? You can't run multiple instances of PostgreSQL on the same machine (even in chroot or jail, even without TCP/IP support) without changing the port number in postgresql.conf. PostgreSQL creates shared memory segments with keys based on the port number, so separate instances will try to create and use the same segments if configured to use the same port number. > PostgreSQL > works under FreeBSD 4.x jails without any modifications, so how is > PostgreSQL itself currently broken? It seems to me that the problem > is with FreeBSD 5.x's jail side of things, if the same daemon runs > fine under 4.x, but, nto under 5.x ... PostgreSQL has always had this problem, both on 4.x and 5.x. A hack was put in place last November to work around it, but it still exists, and while it may now be possible (with 8.0) for multiple postmasters to run on the same machine, it is also still possible for malicious code in one jail to crash postmasters in other jails. The underlying problem is that FreeBSD does not have separate SHM namespaces in each jail, but, as has already been pointed out, that problem is fairly hard to fix. Patching PostgreSQL to use something else than SysV shared memory is easier and will benefit other OSes as well. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86psw84zbi.fsf>