Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-05-07 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > > > Added to TODO: > > > > * Improve detection of shared memory segments being used by other > > FreeBSD jails > > > > http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php > > There's a bit more than that to it -- see > http://ar

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-03-25 Thread Alvaro Herrera
Bruce Momjian wrote: > > Added to TODO: > > * Improve detection of shared memory segments being used by other > FreeBSD jails > > http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php There's a bit more than that to it -- see http://archives.postgresql.org/pgsql-hackers/2008-01/

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-03-24 Thread Bruce Momjian
Added to TODO: * Improve detection of shared memory segments being used by other FreeBSD jails http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php --- Mischa Sandberg wrote: > Here (@sophos.com) we run m

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-01-16 Thread Marc G. Fournier
[EMAIL PROTECTED] (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 >- che

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-01-16 Thread Tom Lane
Stephen Frost <[EMAIL PROTECTED]> writes: > I've got a couple of concerns about this- > #1: Having the shared memory be global is a rather large problem when it > comes to something like PG which can have a fair bit of data going > through that area that could be sensitive. Well, you'd

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-01-16 Thread Stephen Frost
* Mischa Sandberg ([EMAIL PROTECTED]) wrote: > Here (@sophos.com) we run machine cluster tests using FreeBSD jails. A > jail is halfway between a chroot and a VM. Jails blow a number of > assumptions about a unix environment: sysv ipc's are global to all > jails; but a process can only "see" other

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-01-16 Thread Tom Lane
Mischa Sandberg <[EMAIL PROTECTED]> writes: > Quoting Tom Lane <[EMAIL PROTECTED]>: >> Mischa Sandberg <[EMAIL PROTECTED]> writes: >>> + if (kill(1,0) && errno == ESRCH && >>> PGSharedMemoryIsInUse(0,NextShmemSegID)) >>> + continue; >> >> Isn't the last part of

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-01-16 Thread Mischa Sandberg
Quoting Tom Lane <[EMAIL PROTECTED]>: > Mischa Sandberg <[EMAIL PROTECTED]> writes: > > + /* In a FreeBSD jail, you can't "kill -0" a > postmaster > > +* running in a different jail, so the shm seg > might > > +* still be in use. Safer to test nattch ?

Re: [HACKERS] postgresql in FreeBSD jails: proposal

2008-01-16 Thread Tom Lane
Mischa Sandberg <[EMAIL PROTECTED]> writes: > + /* In a FreeBSD jail, you can't "kill -0" a postmaster > +* running in a different jail, so the shm seg might > +* still be in use. Safer to test nattch ? > +*/ > + if (kill(1

[HACKERS] postgresql in FreeBSD jails: proposal

2008-01-16 Thread Mischa Sandberg
Here (@sophos.com) we run machine cluster tests using FreeBSD jails. A jail is halfway between a chroot and a VM. Jails blow a number of assumptions about a unix environment: sysv ipc's are global to all jails; but a process can only "see" other processes also running in the jail. In fact, the quic