Skip site navigation (1) Skip section navigation (2)

Re: HOT synced with HEAD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: HOT synced with HEAD
Date: 2007-09-16 17:19:28
Message-ID: 13456.1189963168@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
"Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
> I liked those changes. I am wondering if we could have avoided
> duplicating the chain following code in heap_hot_search_buffer and
> index_getnext.

I wasn't totally thrilled with duplicating that code, but the callers of
heap_hot_search are only interested in finding a single visible tuple,
whereas index_getnext has to find them all on successive visits.
Exposing a capability to do that in heap_hot_search seemed to make its
API ugly enough that duplicated code was better.  (I really didn't like
the original setup where it was supposed to find the next tuple after
the one passed in, thereby forcing the caller to handle the first
chain member...)

BTW, I'm in process of taking out the separate HEAPTUPLE_DEAD_CHAIN
return value from HeapTupleSatisfiesVacuum.  After looking through
all the callers I concluded that this complicated life more than it
helped.  The places that actually want to make the distinction can
check HeapTupleIsHotUpdated easily enough for themselves, and in
several of the places that don't want to make the distinction it's
notationally cumbersome to deal with it.  For instance, in the patch
as I posted it last night, both heap_hot_search and index_getnext
probably fail to detect all-dead HOT chains, because some of the
chain members are likely to be HEAPTUPLE_DEAD_CHAIN rather than plain
DEAD, and they're not coping.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Pavan DeolaseeDate: 2007-09-16 17:30:07
Subject: Re: HOT synced with HEAD
Previous:From: Pavan DeolaseeDate: 2007-09-16 17:19:09
Subject: Re: Latest README.HOT

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group