Re: Improving deadlock error messages

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Improving deadlock error messages
Дата
Msg-id 1177199014.16415.116.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Improving deadlock error messages  (Neil Conway <neilc@samurai.com>)
Ответы Re: Improving deadlock error messages  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
On Sat, 2007-04-21 at 17:56 -0400, Neil Conway wrote:
> Right, I'm envisioning doing a conditional LockAcquire and then
> heap_open() / heap_getnext() by hand. That will be relatively slow, but
> code that emits a deadlock error message is almost by definition not
> performance critical.

... although it turns out you'd need to conditionally lock a *lot* of
system catalogs to guarantee that you're not going to block on a lock at
some point. Needless to say, that approach would be pretty ugly and
fragile.

> BTW, another alternative would be to set a global variable instructing
> LockAcquire() to not block waiting for a lock; instead, it would
> longjmp(), a la elog(ERROR). You could even construct something similar
> to PG_TRY()

Attached is a very quick hack of a patch to do this.

-Neil


Вложения

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Improving deadlock error messages
Следующее
От: "Nabucodonosor Coutinho"
Дата:
Сообщение: PgAdmin pt_BR traduction