"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> Another alternative might use PG_TRY/PG_CATCH to make sure that the
> semaphore is released. But seems this costs too much ...
I agree.  LWLockAcquire is a hot-spot already.
Maybe we *should* make it a PANIC.  Thoughts?
            regards, tom lane