Re: Minor fix in lwlock.c - Mailing list pgsql-patches

From Qingqing Zhou
Subject Re: Minor fix in lwlock.c
Date
Msg-id d354v5$2gju$1@news.hub.org
Whole thread Raw
In response to Minor fix in lwlock.c  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Responses Re: Minor fix in lwlock.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> writes>
> The alternative would be to move the Unlock loop in front of the
> addition of the LWLock to held_lwlocks[], but I think that cure
> is probably worse than the disease --- the chance of an error during
> Unlock seems nonzero.
>

Another alternative might use PG_TRY/PG_CATCH to make sure that the
semaphore is released. But seems this costs too much ...

Regards,
Qingqing



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Minor fix in lwlock.c
Next
From: Tom Lane
Date:
Subject: Re: Minor fix in lwlock.c