Re: Deadlock possibility in _bt_check_unique? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Deadlock possibility in _bt_check_unique?
Date
Msg-id 4643.1269370972@sss.pgh.pa.us
Whole thread Raw
In response to Re: Deadlock possibility in _bt_check_unique?  (Gokulakannan Somasundaram <gokul007@gmail.com>)
List pgsql-hackers
Gokulakannan Somasundaram <gokul007@gmail.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


pgsql-hackers by date:

Previous
From: Gokulakannan Somasundaram
Date:
Subject: Re: Deadlock possibility in _bt_check_unique?
Next
From: Peter Eisentraut
Date:
Subject: Re: xmlconcat (was 9.0 release notes done)