Skip site navigation (1) Skip section navigation (2)

Re: postgresql in FreeBSD jails: proposal

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: pgadmin-devteam(at)postgresql(dot)org(dot)pgadmin-hackers(at)postgresql(dot)org(dot)pgadmin-support(at)postgresql(dot)org(dot)pgsql-admin(at)postgresql(dot)org(dot)pgsql-advocacy(at)postgresql(dot)org(dot)pgsql-announce(at)postgresql(dot)org(dot)pgsql-benchmarks(at)postgresql(dot)org(dot)pgsql-bugs(at)postgresql(dot)org(dot)pgsql-chat(at)postg
Subject: Re: postgresql in FreeBSD jails: proposal
Date: 2008-01-17 05:52:50
Message-ID: fmmqfh$buq$3@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-bugspgsql-committerspgsql-generalpgsql-hackerspgsql-jdbcpgsql-odbcpgsql-patches
mischa_sandberg(at)telus(dot)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(at)hub(dot)org                              MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664

In response to

Responses

pgsql-odbc by date

Next:From: Tom LaneDate: 2008-01-17 06:09:00
Subject: Re: Strange client encoding issue
Previous:From: Benjamin KrajmalnikDate: 2008-01-17 05:16:50
Subject: Re: Strange client encoding issue

pgsql-patches by date

Next:From: Tom LaneDate: 2008-01-17 06:12:54
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous:From: Bruce MomjianDate: 2008-01-17 02:58:11
Subject: Re: [HACKERS] SSL over Unix-domain sockets

pgsql-admin by date

Next:From: Tom LaneDate: 2008-01-17 06:09:00
Subject: Re: Strange client encoding issue
Previous:From: Benjamin KrajmalnikDate: 2008-01-17 05:16:50
Subject: Re: Strange client encoding issue

pgsql-bugs by date

Next:From: Tom LaneDate: 2008-01-17 06:12:54
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous:From: Tom LaneDate: 2008-01-16 21:01:00
Subject: Re: BUG #3879: OS X Start Script should not `cd /Users/postgres`

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-01-17 06:12:54
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous:From: Bruce MomjianDate: 2008-01-17 02:58:11
Subject: Re: [HACKERS] SSL over Unix-domain sockets

pgsql-committers by date

Next:From: Tom LaneDate: 2008-01-17 06:12:54
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous:From: Andrew DunstanDate: 2008-01-16 22:07:04
Subject: pgsql: Document the fact that COPY always uses the client encoding.

pgsql-general by date

Next:From: Tom LaneDate: 2008-01-17 06:12:54
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous:From: ChrisDate: 2008-01-17 03:30:12
Subject: Re: template0(or template1) is a database?

pgsql-jdbc by date

Next:From: Tom LaneDate: 2008-01-17 06:12:54
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous:From: Tom LaneDate: 2008-01-16 20:51:16
Subject: Re: postgresql in FreeBSD jails: proposal

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group