I wrote: > Look at IpcSemaphoreCreate and InternalIpcSemaphoreCreate in > src/backend/port/sysv_sema.c. It may be worth stepping through them > with gdb to see what the semget calls are returning.
BTW, even before doing that, you should look at "ipcs -s" output to try to get a clue what's going on. The EINVAL failures may be because the second postmaster to start deletes the semaphores created by the first one. You could easily see this happening in before-and-after ipcs data if so. strace'ing startup of the second postmaster is another approach that might be easier than gdb'ing. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster