Re: heap_hot_search_buffer refactoring - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: heap_hot_search_buffer refactoring
Date
Msg-id 1308997485.2443.89.camel@jdavis
Whole thread Raw
In response to Re: heap_hot_search_buffer refactoring  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: heap_hot_search_buffer refactoring
List pgsql-hackers
On Fri, 2011-06-24 at 15:32 -0400, Robert Haas wrote:
> On Sun, Jun 19, 2011 at 2:16 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> > New patch attached, with that one-line change.
> 
> Jeff, are you planning to review this further?  Do you think it's OK to commit?

1. Patch does not apply to master cleanly, and it's in unified format
(so I can't compare it against the old patch very easily). This review
is for the first patch, disregarding the "skip = !first_call" issue that
you already fixed. If you had other changes in the latest version,
please repost the patch.

2. Comment above heap_hot_search_buffer should be updated to document
that heapTuple is an out-parameter and document the behavior of
first_call

3. The logic around "skip" is slightly confusing to me. Here's my
description: if it's not an MVCC snapshot and it's not the first call,
then you don't actually want to fetch the tuple with the given tid or a
later one in the chain -- you want to fetch the _next_ tuple in the
chain or a later one in the chain. Some wording of that description in a
comment (either in the function's comment or near the use of "skip")
would help a lot. Also, if skip is true, then the tid _must_ be visible
according to the (non-MVCC) snapshot, correct? It might help if that was
apparent from the code/comments.

Other than that, it looks good.

Regards,Jeff Davis





pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: debugging tools inside postgres
Next
From: "Kevin Grittner"
Date:
Subject: Re: Repeated PredicateLockRelation calls during seqscan