On 5/19/07, Heikki Linnakangas <[EMAIL PROTECTED]> 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