Re: hash index improving v3

"Alex Hunsaker" <[email protected]> Fri, 5 Sep 2008 23:49:05 -0600
Newsgroups gmane.comp.db.postgresql.devel.patches
Message-ID <[email protected]>
]

On Fri, Sep 5, 2008 at 2:21 PM, Alex Hunsaker <[email protected]> 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++;
  		}

-- 
Sent via pgsql-patches mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches