Re: Deadlock possibility in _bt_check_unique?

Поиск
Список
Период
Сортировка
От Gokulakannan Somasundaram
Тема Re: Deadlock possibility in _bt_check_unique?
Дата
Msg-id 9362e74e1003231202ifd377f5o652778e61895019f@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Deadlock possibility in _bt_check_unique?  (Gokulakannan Somasundaram <gokul007@gmail.com>)
Список pgsql-hackers
Oh! yeah, i got it.  Thanks....

On Wed, Mar 24, 2010 at 12:26 AM, Gokulakannan Somasundaram <gokul007@gmail.com> wrote:

> T2 : session 1 releases the lock on p1 (its waiting to acquire a ex lock on
> p2)

That's not what we do.  See _bt_findinsertloc.

                       regards, tom lane

      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. I wrote ex lock in the place of BT_WRITE.

00589         for (;;)
00590 {
00591 BlockNumber rblkno = lpageop->btpo_next;
00592
00593 rbuf = _bt_relandgetbuf(rel, rbuf, rblkno, BT_WRITE);
00594 page = BufferGetPage(rbuf);
00595 lpageop = (BTPageOpaque) PageGetSpecialPointer(page);
00596 if (!P_IGNORE(lpageop))
00597 break;
00598 if (P_RIGHTMOST(lpageop))
00599 elog(ERROR, "fell off the end of index \"%s\"",
00600 RelationGetRelationName(rel));
00601 }



What is that, i am missing here?

Gokul.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Proposal: access control jails (and introduction as aspiring GSoC student)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Deadlock possibility in _bt_check_unique?