Re: row-level deadlock problem

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: row-level deadlock problem
Дата
Msg-id 20041127192948.GB31246@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: row-level deadlock problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: row-level deadlock problem  (Kamil Kaczkowski <kamil@kamil.eisp.pl>)
Список pgsql-general
On Sat, Nov 27, 2004 at 12:58:36PM -0500, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > Well, there has to be something, since an UPDATE in Read Committed mode
> > simply doesn't have any locks that can deadlock.
>
> You're mistaken; it takes a row lock on each row it updates.  I'm not
> sure why the two UPDATEs are visiting the same rows in different orders,
> but if they do the failure is certainly possible.

One of them could be using an indexscan while the other is not.  If the
heap is in reverse order compared to the scan, that would explain it.

Is there a solution to this problem?  The FK deadlock problem can be
fixed with shared row locks, but this is a different one.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"La felicidad no es mañana. La felicidad es ahora"

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

Предыдущее
От: Chris Green
Дата:
Сообщение: Re: Can one alter the format of a numeric column?
Следующее
От: Kamil Kaczkowski
Дата:
Сообщение: Re: row-level deadlock problem