Deadlock possibility in _bt_check_unique?

From: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
To: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Deadlock possibility in _bt_check_unique?
Date: 2010-03-23 09:53:43
Message-ID: 9362e74e1003230253o751a776cha25cf15747d87e6a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
With the implementation of deferred unique constraints, we need to go
back to the index second time to check whether the unique check is valid.
Say a situation occurs like this
a) the first session doing the unique check finds out that there is a unique
check required second time and just makes its entry and comes back
b) the second session doing the unique check finds out that there is a
unique check required second time and just makes its entry and comes back

While they do the second check, first session will wait for the session to
complete and vice versa. Won't this result in a deadlock? Isn't this a
realistic scenario?

Thanks,
Gokul.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-03-23 10:19:49 Re: Deadlock possibility in _bt_check_unique?
Previous Message Dimitri Fontaine 2010-03-23 08:54:51 Re: Proposal: access control jails (and introduction as aspiring GSoC student)