# Running PostgreSQL in a FreeBSD 8+ jail?



## osx-addict (Mar 8, 2010)

Last time I tried to run Postgres in a jail on my Proliant server (under FreeBSD 7.1), it didn't work and had issues -- I think related to the need for SysV IPC stuff.  I had seen others complaining of similar issues -- which were resolved once you moved Postgres out of the jail.. I'm rebuilding all of my jails (sendmail, apache, etc) and can try to create another Postgres jail but figured if the issue wasn't yet solved I'd leave things alone.. 

Anyone got one running in 8 or higher?  Thx!


----------



## achix (Mar 8, 2010)

It doesn't matter if its 7, 8 or -CURRENT. SYSV IPC code remained the same AFAIK.
The classic "official" postgresql-camp-wise solution was to have each postmaster listening to a different distinct port. Others have suggested that they had good luck with leaving the default port (5432), but changing the uid of the postgres user in each jail.
There used to be some patches for this (freebsd-wise) here: http://docs.freevps.com/doku.php?id=freebsd:changelog but i dont know if this is still relevant.


----------



## graudeejs (Mar 8, 2010)

I've been writing how to configure PostgreSQL to run in jail in this thread:
http://forums.freebsd.org/showthread.php?t=10728


----------

