Re: Deadlock possibility in _bt_check_unique?
От | Heikki Linnakangas |
---|---|
Тема | Re: Deadlock possibility in _bt_check_unique? |
Дата | |
Msg-id | 4BA895C5.2080000@enterprisedb.com обсуждение исходный текст |
Ответ на | Deadlock possibility in _bt_check_unique? (Gokulakannan Somasundaram <gokul007@gmail.com>) |
Ответы |
Re: Deadlock possibility in _bt_check_unique?
|
Список | pgsql-hackers |
Gokulakannan Somasundaram wrote: > 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? Yes, that can happen. The deadlock detector will kick in and abort one of the sessions. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: