Re: [GENERAL] Non-overlapping updates blocking each other

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Non-overlapping updates blocking each other
Дата
Msg-id 13898.1507998753@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Non-overlapping updates blocking each other  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
Melvin Davidson <melvin6925@gmail.com> writes:
> On Sat, Oct 14, 2017 at 12:01 PM, Thomas Kellerer <spam_eater@gmx.net>
> wrote:
>> Since when does Postgres lock the whole table during an update?

> When the optimizer thinks it needs to do a TABLE SCAN!

Sorry, but that's nonsense.

More likely explanations for the OP's problem involve foreign key
constraints that cause two different row updates to need to lock
the same referenced row, or maybe he's using some index type that
has greater locking demands than a btree, or he's using serializable
mode and fell foul of one of its approximations as to which rows
the update depends on, or perhaps some other corner case.  We'd need
more info about the schema and the Postgres version to tell for sure.
        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] Non-overlapping updates blocking each other
Следующее
От: Seamus Abshere
Дата:
Сообщение: Re: [GENERAL] Non-overlapping updates blocking each other