Re: [ADMIN] postgresql in FreeBSD jails: proposal

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [ADMIN] postgresql in FreeBSD jails: proposal
Date: 2008-01-17 06:17:53
Message-ID: B72666942EA7D6CFBC0B7C37@ganymede.hub.org
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Thursday, January 17, 2008 01:12:54 -0500 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> "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.

No arguments here, just pointing out that changing PGPORT isn't/wasnt' the only
way of addressing this problem ... if we can do something more 'internal', it
would definitely make life alot easier ...

- ----
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHjvMR4QvfyHIvDvMRAjJuAKCAYGkyvDOMkA6wqeQ7nAqoA1mkRQCdG+5n
aD1uG+zUtevdJGJ3BsqeDAs=
=Y0DY
-----END PGP SIGNATURE-----

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Achilleas Mantzios 2008-01-17 08:11:30 Re: postgresql in FreeBSD jails: proposal
Previous Message Tom Lane 2008-01-17 06:12:54 Re: [ADMIN] postgresql in FreeBSD jails: proposal

Browse pgsql-bugs by date

  From Date Subject
Next Message Suresh Gupta VG 2008-01-17 07:44:53 Bug in all version with encryption
Previous Message Tom Lane 2008-01-17 06:12:54 Re: [ADMIN] postgresql in FreeBSD jails: proposal

Browse pgsql-committers by date

  From Date Subject
Next Message Achilleas Mantzios 2008-01-17 08:11:30 Re: postgresql in FreeBSD jails: proposal
Previous Message Tom Lane 2008-01-17 06:12:54 Re: [ADMIN] postgresql in FreeBSD jails: proposal

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2008-01-17 08:11:30 Re: postgresql in FreeBSD jails: proposal
Previous Message Ken Johanson 2008-01-17 06:13:39 Re: Patch for Statement.getGeneratedKeys()

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2008-01-17 08:10:52 Re: [HACKERS] SSL over Unix-domain sockets
Previous Message Tom Lane 2008-01-17 06:12:54 Re: [ADMIN] postgresql in FreeBSD jails: proposal

Browse pgsql-jdbc by date

  From Date Subject
Next Message Achilleas Mantzios 2008-01-17 08:11:30 Re: postgresql in FreeBSD jails: proposal
Previous Message Ken Johanson 2008-01-17 06:13:39 Re: Patch for Statement.getGeneratedKeys()

Browse pgsql-odbc by date

  From Date Subject
Next Message Achilleas Mantzios 2008-01-17 08:11:30 Re: postgresql in FreeBSD jails: proposal
Previous Message Tom Lane 2008-01-17 06:12:54 Re: [ADMIN] postgresql in FreeBSD jails: proposal

Browse pgsql-patches by date

  From Date Subject
Next Message Hiroshi Saito 2008-01-17 07:14:59 Compile of Test example is put into win32.mak of libpq.
Previous Message Tom Lane 2008-01-17 06:12:54 Re: [ADMIN] postgresql in FreeBSD jails: proposal