Re: Deadlock possibility in _bt_check_unique?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deadlock possibility in _bt_check_unique?
Date: 2010-03-23 19:02:52
Message-ID: 4643.1269370972@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gokulakannan Somasundaram <gokul007(at)gmail(dot)com> writes:
> I am really confused. Please keep the cool and explain me, if i am
> wrong. I could see this code in _bt_findinsertloc. There is a
> _bt_relandgetbuf, which releases lock on p1 and tries to acquire a lock on
> p2.

No, read it again. The only locks that get released inside that loop
are ones on intermediate dead pages (rbuf is not buf). The lock on the
original page is only released after the loop.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-03-23 22:35:07 Re: xmlconcat (was 9.0 release notes done)
Previous Message Gokulakannan Somasundaram 2010-03-23 19:02:24 Re: Deadlock possibility in _bt_check_unique?