deadlock avoidance - Mailing list pgsql-general

From Clarence Gardner
Subject deadlock avoidance
Date
Msg-id Pine.SUN.4.02.10609252353500.11969-100000@beach.silcom.com
Whole thread Raw
Responses Re: deadlock avoidance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I noticed the following in some of our code today:
    select ... <join list> ... for update of a, b;

Inasmuch as the cardinal rule for avoiding deadlocks is to acquire
locks in a consistent order, should such a construction be avoided
in favor of two separate "select ... for update" statements so that
the order of acquisition of a and b is known? I'm assuming that
there is no ordering implied/guaranteed by "for update of a, b".

Or am I missing something?

Clarence


pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: getting dates in the past
Next
From: Tom Lane
Date:
Subject: Re: deadlock avoidance