Re: semaphore usage "port based"? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: semaphore usage "port based"?
Date
Msg-id 25526.1144017388@sss.pgh.pa.us
Whole thread Raw
In response to Re: semaphore usage "port based"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: semaphore usage "port based"?  ("Marc G. Fournier" <scrappy@postgresql.org>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: semaphore usage "port based"?
Next
From: "Jonah H. Harris"
Date:
Subject: Re: pg_class catalog question...