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

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: deadlock in single-row select-for-update + update scenario? How could it happen?
Дата
Msg-id CAMkU=1y5honjR=VPpsnaY1ZsJRwAsChj=CCu-zhv3ZRHMeWX1A@mail.gmail.com
обсуждение исходный текст
Ответ на deadlock in single-row select-for-update + update scenario? How could it happen?  (hubert depesz lubaczewski <depesz@gmail.com>)
Ответы Re: deadlock in single-row select-for-update + update scenario? How could it happen?  (hubert depesz lubaczewski <depesz@gmail.com>)
Список pgsql-general
On Fri, Aug 22, 2014 at 9:29 AM, hubert depesz lubaczewski <depesz@gmail.com> wrote:
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 transaction isolation level is being used?

Cheers,

Jeff

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

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