Re: How to handle waitingForLock in LockWaitCancel()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to handle waitingForLock in LockWaitCancel()
Дата
Msg-id 15997.983772968@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to handle waitingForLock in LockWaitCancel()  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Список pgsql-hackers
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> I sometimes encountered SEGV errors in my test case
> when I canceled the execution.

Can you provide backtraces from these SEGVs?

> Probably it's due to the almost simultaneous arrival
> of multiple signals and the following patch seems to
> fix the bug. However I'm afraid that the change should
> cause another bug.

I do not like that change at *all*.  In the first place, how could it
stop whatever is causing the SEGV?  The waitingForLock flag is not
examined anywhere else, so unless things are already broken this cannot
have any effect.  In the second place, postponing the reset of the
flag has the potential for an infinite loop, because this routine is
called during error exit.  Suppose LockLockTable causes an elog(ERROR)?

I think we need to look harder to find the cause of the SEGVs you are
seeing.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: How to handle waitingForLock in LockWaitCancel()
Следующее
От: "Patrick Dunford"
Дата:
Сообщение: Getting unique ID through SQL