Re: Deadlock with tsearch2 index ...

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Deadlock with tsearch2 index ...
Дата
Msg-id 1117566265.4900.3.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Deadlock with tsearch2 index ...  ("Marc G. Fournier" <scrappy@postgresql.org>)
Список pgsql-hackers
On T, 2005-05-31 at 14:41 -0300, Marc G. Fournier wrote:
> Just want to make sure that this is, in fact, what is expected:
> 
> client1: begin;
> client1: update articles set some_col = <foo> where id = <bar>;
> client2: update articles set some_col2 = <foo2> where id = <bar>;
> client1: update articles set some_col3 = <foo> where id = <bar>;
> client1: ** deadlock **
> 
> client2 can't finish its 'transaction', and is therefore preventing 
> client1 from continuing ... ?
> 
> Assuming that this is, in fact, 'normal', is there a way of breaking the 
> deadlock?
> 
> If this is *not*, in fact, 'normal', is there any more information that I 
> can provide to debug this?

This is the infamous 'lock for update' of foreign key master.

It should be fixed for 8.1 by creating a shared row lock, but for 8.0
and below you can either drop the FK constraint, or replace it with a
CHECK using a function that does a select.

-- 
Hannu Krosing <hannu@tm.ee>


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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Interval->day proposal
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Consumer-grade vs enterprise-grade disk drives