Re: [GENERAL] Non-overlapping updates blocking each other - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Non-overlapping updates blocking each other
Date
Msg-id 13898.1507998753@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Non-overlapping updates blocking each other  (Melvin Davidson <melvin6925@gmail.com>)
List 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 by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: [GENERAL] Non-overlapping updates blocking each other
Next
From: Seamus Abshere
Date:
Subject: Re: [GENERAL] Non-overlapping updates blocking each other