Date: Wed, 28 Oct 2009 22:37:01 -0500 From: "Sam Fourman Jr." <sfourman@gmail.com> To: freebsd general questions <freebsd-questions@freebsd.org> Subject: Multiple PostgreSQL 8.4 instances in FreeBSD 8.0 RC2 Jails Message-ID: <11167f520910282037s49d40fd7x7617e996a27d4f22@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello List, I want to setup 5 postgreSQL 8.4 servers in separate jails on a amd64 FreeBSD 8.0 RC2 machine while searching the web for someone that has done this before I found this: my question is this... is this still relevant on FreeBSD 8.0 RC2(amd64) and postgreSQL 8.4 The following was taken from this link http://www.opensubscriber.com/message/freebsd-stable@freebsd.org/1244846.html "Marc G. Fournier" <scrappy@hub....> 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 Sam Fourman Jr. Fourman Networks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11167f520910282037s49d40fd7x7617e996a27d4f22>