Re: Minor fix in lwlock.c
От
Tom Lane
Тема
Re: Minor fix in lwlock.c
Дата
Msg-id
9304.1112937642@sss.pgh.pa.us
Ответ на
Re: Minor fix in lwlock.c (Qingqing Zhou)
Список
Дерево обсуждения
Re: Minor fix in lwlock.c "Qingqing Zhou" <zhouqq@cs.toronto.edu>
"Qingqing Zhou" writes: > I guess the problem is here: > /* > * Fix the process wait semaphore's count for any absorbed wakeups. > */ > while (extraWaits-- > 0) > PGSemaphoreUnlock(&proc->sem); Mmm. Could be a problem, but the chances of having extraWaits>0 is really pretty small. In any case, FATAL doesn't fix this, because it will still try to go through normal backend exit cleanup which requires having working LWLock support. If you take the above risk seriously then you need a PANIC error. 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. regards, tom lane
В списке pgsql-patches по дате отправления