Re: Maintaining cluster order on insert - Mailing list pgsql-patches

From Pavan Deolasee
Subject Re: Maintaining cluster order on insert
Date
Msg-id 2e78013d0705210117y6a65245cw426bbaafa9eb6419@mail.gmail.com
Whole thread Raw
In response to Re: Maintaining cluster order on insert  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: Maintaining cluster order on insert  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
List 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 by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Patch needed fot dt.h
Next
From: "Pavan Deolasee"
Date:
Subject: Re: Maintaining cluster order on insert