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?
Дата
Msg-id CAKrjmhfW7PO5CaH=XqiZ6Nr566pww=MkmUmEPcTrq2RU0iMsjg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: deadlock in single-row select-for-update + update scenario? How could it happen?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, Aug 22, 2014 at 7:49 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
You have not shown us the full sequence of events leading up to the
deadlock failure, but I hypothesize that there were yet other transactions
that updated that same row in the very recent past.  That might allow
there to be more than one tuple lock involved (ie, locks on different
versions of the row), which would create some scope for a deadlock
failure.

Well, showing all events is difficult due to parallelization of importer, but shouldn't "select for update" solve the problem of other locks?

The transactions are exactly as shown - select for update and then update.

depesz

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

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