On Tue, Apr 04, 2006 at 10:17:18AM -0400, Vivek Khera wrote:
> Perhaps you can hack into the postgresql master a flag that alters  
> the "1000" parameter, or starts at a port * 1000 + N, then hard-code  
> that flag into your startup script per jail.

A quick and dirty hack to fudge with the requested semid (and shared
memroy identifier) is attached.  Replace XXX with an arbitrary number.

It would be better if this was configurable, but doing it that way works
well enough for what I need, and may at least give an idea where to
start on a better workaround.

Craig
--- src/backend/storage/ipc/ipci.c.orig Tue Feb 28 10:09:23 2006
+++ src/backend/storage/ipc/ipci.c      Tue Feb 28 10:09:38 2006
@@ -102,14 +102,14 @@
                /*
                 * Create the shmem segment
                 */
-               seghdr = PGSharedMemoryCreate(size, makePrivate, port);
+               seghdr = PGSharedMemoryCreate(size, makePrivate, port + XXX);
 
                /*
                 * Create semaphores
                 */
                numSemas = ProcGlobalSemas();
                numSemas += SpinlockSemas();
-               PGReserveSemaphores(numSemas, port);
+               PGReserveSemaphores(numSemas, port + XXX);
        }
        else
        {
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to