Avoiding deadlocks ...

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Avoiding deadlocks ...
Date: 2010-08-19 22:51:48
Message-ID: 4C6DB584.8090004@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin,

This one is for you:

Two sessions, in transaction:

Process A Process B

update session where id = X;
update order where orderid = 5;
update order where orderid = 5;
update order where orderid = 5;
... deadlock error.

It seems like we ought to be able to avoid a deadlock in this case;
there's a clear precedence of who grabbed the order row first. Does
your serializability patch address the above situation at all?

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Steven Schlansker 2010-08-19 22:54:36 Re: COPY FROM/TO losing a single byte of a multibyte UTF-8 sequence
Previous Message Tom Lane 2010-08-19 22:24:41 Re: COPY FROM/TO losing a single byte of a multibyte UTF-8 sequence