Re: [pgsql-patches] Ctid chain following enhancement - Mailing list pgsql-patches

From Zdenek Kotala
Subject Re: [pgsql-patches] Ctid chain following enhancement
Date
Msg-id 465C30CF.5080105@sun.com
Whole thread Raw
In response to Re: Ctid chain following enhancement  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Responses Re: [pgsql-patches] Ctid chain following enhancement  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
List pgsql-patches
Pavan Deolasee wrote:
>
> On 1/28/07, *Tom Lane* <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.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

pgsql-patches by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Interval input: usec, msec
Next
From: Alvaro Herrera
Date:
Subject: Re: Seq scans status update