Re: hash index improving v3 - Mailing list pgsql-patches

From Alex Hunsaker
Subject Re: hash index improving v3
Date
Msg-id 34d269d40809052249h59750f83v4b19a50d0555580@mail.gmail.com
Whole thread Raw
In response to Re: hash index improving v3  ("Alex Hunsaker" <badalex@gmail.com>)
Responses Re: hash index improving v3
Re: hash index improving v3
List pgsql-patches
]

On Fri, Sep 5, 2008 at 2:21 PM, Alex Hunsaker <badalex@gmail.com> wrote:
> Ok now that I made it so it actually *test* collisions, with the patch
> it always returns all rows that matched the hashed "key".

And here is the fix, we just forget to set the recheck flag for bitmap scans.

*** a/src/backend/access/hash/hash.c
--- b/src/backend/access/hash/hash.c
***************
*** 317,323 **** hashgetbitmap(PG_FUNCTION_ARGS)
          /* Save tuple ID, and continue scanning */
          if (add_tuple)
          {
!             tbm_add_tuples(tbm, &scan->xs_ctup.t_self, 1, false);
              ntids++;
          }

--- 317,323 ----
          /* Save tuple ID, and continue scanning */
          if (add_tuple)
          {
!             tbm_add_tuples(tbm, &scan->xs_ctup.t_self, 1, true);
              ntids++;
          }

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: libpq events patch (with sgml docs)
Next
From: Tom Lane
Date:
Subject: Re: hash index improving v3