Re: semaphore usage "port based"?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: semaphore usage "port based"?
Date: 2006-04-02 22:36:28
Message-ID: 25526.1144017388@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-04-02 22:42:29 Re: pg_class catalog question...
Previous Message Tom Lane 2006-04-02 22:23:24 Re: semaphore usage "port based"?