"Tom Lane" <tgl@sss.pgh.pa.us> writes
> I don't see any reason to think we'd be unable to recover normally from
such a
> bug --- do you?
>
I guess the problem is here:
/*
* Fix the process wait semaphore's count for any absorbed wakeups.
*/
while (extraWaits-- > 0)
PGSemaphoreUnlock(&proc->sem);
elog(ERROR) won't recover semaphore count.