Re: Maintaining cluster order on insert

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: Maintaining cluster order on insert
Дата
Msg-id 2e78013d0705210117y6a65245cw426bbaafa9eb6419@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Maintaining cluster order on insert  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: Maintaining cluster order on insert  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Список pgsql-patches


On 5/19/07, Heikki Linnakangas <heikki@enterprisedb.com > wrote:

Ah, sorry about that. For some reason my source tree was checked out
from the 8.2 branch, instead of CVS HEAD.


I looked at the patch. Not that I am very comfortable with this part
of the code, but nevertheless here are my comments:


I am wondering if we can optimize _bt_moveright() code by remembering
the PageLSN of the page before releasing the READ LOCK. If the page
is indeed changed since we last saw it, the PageLSN must be different
than what we had remembered and gives us a hint that we might need
to move right.


!           /* Page was full. Release lock and pin and get another block
!            * as if suggested_blk was not given.
!            */
!           LockBuffer(suggested_buf, BUFFER_LOCK_UNLOCK);
!           ReleaseBuffer(suggested_buf);

May be you want to use UnlockReleaseBuffer()  or  _bt_relbuf() just as a shorthand.
Btw, I wonder why _bt_relbuf() exists and even so why does it take "Relation"
argument ?

Thanks,
Pavan

--

EnterpriseDB     http://www.enterprisedb.com

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Patch needed fot dt.h
Следующее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: Maintaining cluster order on insert