Re: heap_hot_search_buffer refactoring

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: heap_hot_search_buffer refactoring
Date: 2011-06-19 18:16:43
Message-ID: BANLkTi=pVQffZL_J8OVNPkKUQQ2+7bQJLw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 19, 2011 at 2:01 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Sun, 2011-06-19 at 10:50 -0700, Jeff Davis wrote:
>> On Mon, 2011-06-06 at 14:03 -0400, Robert Haas wrote:
>> > The attached patch refactors heap_hot_search_buffer() so that
>> > index_getnext() can use it, and modifies index_getnext() to do so.
>>
>> Attached is a version of the patch that applies cleanly to master.
>
> In heap_hot_search_buffer:
>
>  +       /* If this is not the first call, previous call returned
>             a (live!) tuple */
>          if (all_dead)
>  -               *all_dead = true;
>  +               *all_dead = !first_call;
>
> I think that's a typo: it should be:
>
>  +               *all_dead = first_call;

Yikes. I think you are right. It's kind of scary that the regression
tests passed with that mistake.

New patch attached, with that one-line change.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
heap-hot-search-refactoring-v2.patch application/octet-stream 15.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-19 18:17:57 Re: the big picture for index-only scans
Previous Message Jeff Davis 2011-06-19 18:08:39 Re: Range Types and extensions