Re: Deadlock possibility in _bt_check_unique?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Deadlock possibility in _bt_check_unique?
Дата
Msg-id 3384.1269366595@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Deadlock possibility in _bt_check_unique?  (Gokulakannan Somasundaram <gokul007@gmail.com>)
Ответы Re: Deadlock possibility in _bt_check_unique?  (Gokulakannan Somasundaram <gokul007@gmail.com>)
Список pgsql-hackers
Gokulakannan Somasundaram <gokul007@gmail.com> writes:
> This is fine, if the second session has to pass through the page, where the
> first session inserted the record. But as i said if the second session finds
> a free slot before hitting on the page where the first session inserted,
> then it will never hit the page with write lock. The comment says that,

No, you don't understand how it works.  All would-be inserters will hit
the same target page to begin with, ie, the first one that the new key
could legally be inserted on.  The lock that protects against this
problem is the lock on that page, regardless of which page the key
actually ends up on.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gokulakannan Somasundaram
Дата:
Сообщение: Re: Deadlock possibility in _bt_check_unique?
Следующее
От: Gokulakannan Somasundaram
Дата:
Сообщение: Re: Deadlock possibility in _bt_check_unique?