Re: Problem with locks

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL-development Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with locks
Date: 2007-08-12 16:50:36
Message-ID: 87tzr4zogz.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> I've written a synthetic test program to check for lost semaphore wakeups.
>
> Seems to me this proves nothing much, since it doesn't use the same SysV
> semaphore API PG does. Please adjust so that it looks more like our
> code --- in particular there should be multiple processes having
> semaphores in the same semid group.

I was trying to copy the semaphore API exactly assuming
USE_NAMED_POSIX_SEMAPHORES was *not* defined. According to the comments we
prefer not to use named semaphores if possible.

> Also, I think you have race conditions at shutdown --- the appearance of
> the "thread %d lost a wakeup" message would not convince me there was
> a bug in the least. You need to make sure the workers exit at a known
> point in their loop.

I intended to try to recreate the dynamics of the deadlock timeout timer
signal. This was just a first cut.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-08-12 17:22:30 Re: Problem with locks
Previous Message Bertram Scharpf 2007-08-12 16:36:47 Re: Wrote a connect-by feature