deadlock in single-row select-for-update + update scenario? How could it happen?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема deadlock in single-row select-for-update + update scenario? How could it happen?
Дата
Msg-id CAKrjmhdN+GhAjNwqfHsOtGp+7YN27zR79m99RcAJMNazt5NJrA@mail.gmail.com
обсуждение исходный текст
Ответы Re: deadlock in single-row select-for-update + update scenario? How could it happen?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: deadlock in single-row select-for-update + update scenario? How could it happen?  (Jeff Janes <jeff.janes@gmail.com>)
Re: deadlock in single-row select-for-update + update scenario? How could it happen?  (John R Pierce <pierce@hogranch.com>)
Re: deadlock in single-row select-for-update + update scenario? How could it happen?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-general
I have developer with pg 9.3.5, which is reporing something really strange.

He runs importer, which does, in single transaction:

begin;
select * from table where pkey = <value> limit 1 for update;
update table set ... where pkey = <the same_value>;
commit;

and two backends running the same transaction deadlock.

I checked for duplicated rows with the same pkey value - none are there. And frankly - I'm out of ideas.

What could be wrong in such case?

Detailed logs, with just some obfuscation: https://depesz.privatepaste.com/0594a93459

depesz

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

Предыдущее
От: Joseph Kregloh
Дата:
Сообщение: Restart replicated slave procedure
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: deadlock in single-row select-for-update + update scenario? How could it happen?