Re: BUG #5689: UPDATE locks index before table resulting in deadlock

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Ajamian" <peter(at)pajamian(dot)dhs(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5689: UPDATE locks index before table resulting in deadlock
Date: 2010-10-02 14:23:20
Message-ID: 5499.1286029400@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Peter Ajamian" <peter(at)pajamian(dot)dhs(dot)org> writes:
> From what I can understand, the UPDATE is trying to lock the index before
> locking the table.

That is not the case, as study of the source code will prove to you.

I think what probably happened here is that the UPDATE was part of
a transaction that already had some relevant locks, but you haven't
provided enough information to diagnose it beyond that.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message stagirus 2010-10-02 21:03:28 Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Previous Message Andrea Peri 2010-10-02 13:08:18 Postgres 9.0 crash on win7