Re: [ADMIN] postgresql in FreeBSD jails: proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Date: 2008-01-17 06:12:54
Message-ID: 4089.1200550374@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-bugs pgsql-committers pgsql-general pgsql-hackers pgsql-jdbc pgsql-odbc pgsql-patches

"Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
> 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 ...

Sure, but in the spirit of "belt and suspenders too", I'd think that
doing that *and* something like Mischa's proposal wouldn't be bad.

(BTW, as far as I saw the original post only went to -hackers
... there's something messed up about your reply.)

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Marc G. Fournier 2008-01-17 06:17:53 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Tom Lane 2008-01-17 06:09:00 Re: Strange client encoding issue

Browse pgsql-bugs by date

  From Date Subject
Next Message Marc G. Fournier 2008-01-17 06:17:53 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Marc G. Fournier 2008-01-17 05:52:50 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-committers by date

  From Date Subject
Next Message Marc G. Fournier 2008-01-17 06:17:53 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Marc G. Fournier 2008-01-17 05:52:50 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-general by date

  From Date Subject
Next Message Ken Johanson 2008-01-17 06:13:39 Re: Patch for Statement.getGeneratedKeys()
Previous Message Marc G. Fournier 2008-01-17 05:52:50 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2008-01-17 06:17:53 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Marc G. Fournier 2008-01-17 05:52:50 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ken Johanson 2008-01-17 06:13:39 Re: Patch for Statement.getGeneratedKeys()
Previous Message Marc G. Fournier 2008-01-17 05:52:50 Re: postgresql in FreeBSD jails: proposal

Browse pgsql-odbc by date

  From Date Subject
Next Message Marc G. Fournier 2008-01-17 06:17:53 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Tom Lane 2008-01-17 06:09:00 Re: Strange client encoding issue

Browse pgsql-patches by date

  From Date Subject
Next Message Marc G. Fournier 2008-01-17 06:17:53 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Marc G. Fournier 2008-01-17 05:52:50 Re: postgresql in FreeBSD jails: proposal