From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] 'Waiting on lock' |
Date: | 2007-06-19 17:32:04 |
Message-ID: | 7902.1182274324@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Attached is a patch which moves the messages to ProcSleep(). To do this I had
> to move the semaphore signal to unconditionally be signalled whenever
> CheckDeadLock() is called regardless of whether it finds a hard deadlock. I'm
> not 100% sure that's correct but afaik we only use semaphores to signal state
> changes and deal with spurious semaphore firings everywhere.
It's a bit itchy-seeming, but I think what you are actually doing is
going over to a regime where every wait on the semaphore checks and
re-waits if it didn't get the condition it wants. Before, I think we
did that for every use of the semaphore except this one (which is an
outgrowth of the fact that originally this was indeed the only use of
the sema, and the others got shoehorned in over time).
I'll check it over.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paesold | 2007-06-19 17:37:40 | Re: WIP: rewrite numeric division |
Previous Message | Tom Lane | 2007-06-19 17:28:55 | Re: [HACKERS] 'Waiting on lock' |