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

From Alvaro Herrera
Subject Re: [GENERAL] Non-overlapping updates blocking each other
Date
Msg-id 20171016132416.nado5ot4l6yhyndc@alvherre.pgsql
Whole thread Raw
In response to Re: [GENERAL] Non-overlapping updates blocking each other  (Seamus Abshere <seamus@abshere.net>)
List pgsql-general
Did you try using SELECT FOR NO KEY UPDATE instead of SELECT FOR UPDATE?

However:

Seamus Abshere wrote:

> My current theory is that, since the table is not clustered by id, rows
> with very distant ids get stored in the same page, and the whole page is
> locked during an update.

But we only lock one heap page at a time, not many, so it's hard to see
how that would deadlock.

> Or something.

Given your reluctance to share more details, it seems you'd have to do
with that explanation.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
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: Seamus Abshere
Date:
Subject: Re: [GENERAL] Non-overlapping updates blocking each other
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Non-overlapping updates blocking each other