Re: BUG #16820: PG will have a deadlock when multiple rows are updated concurrently

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16820: PG will have a deadlock when multiple rows are updated concurrently
Дата
Msg-id 1283728.1610555199@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16820: PG will have a deadlock when multiple rows are updated concurrently  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> (1) As long as the data of a single update exceeds 1 row, a deadlock will
> occur:
> update zxin_cardcapacity set usecapacity = usecapacity - 2 where a >2;

I see no particular bug here.  If you want to have multiple transactions
updating the same rows concurrently, it's up to you to ensure that each
transaction touches the rows in the same order, otherwise of course there
will be a deadlock.

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16823: Unreachable code
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16823: Unreachable code