Pavan Deolasee wrote:
>
> On 1/28/07, *Tom Lane* <tgl(at)sss(dot)pgh(dot)pa(dot)us <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>
> wrote:
>
> OTOH it might be
> cleaner to refactor things that way, if we were going to apply this.
>
>
> Here is a revised patch which includes refactoring of
> heap_get_latest_tid(), as per Tom's suggestion.
>
I'm looking on your patch. I have one comment:
If you have old tid and new tid you can easy compare if new tid points
to different page? And if page is still same there is no reason to
Unlock it and lock again. I think add inner loop something like:
Readbufer
Lock
do{
...
} while(ctid.block_id == tid.block_id)
ReleaseAndUnlock
can save some extra locking/unlocking cycle. What do you think?
Zdenek