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

Re: hash index improving v3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alex Hunsaker" <badalex(at)gmail(dot)com>
Cc: "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com>, "Xiao Meng" <mx(dot)cogito(at)gmail(dot)com>, pgsql-patches(at)postgresql(dot)org, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Subject: Re: hash index improving v3
Date: 2008-09-05 02:17:07
Message-ID: 11962.1220581027@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Alex Hunsaker" <badalex(at)gmail(dot)com> writes:
> On Thu, Sep 4, 2008 at 7:45 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> So what we need for testing is a few different key values that hash to
>> the same code.  Not sure about an easy way to find such.

> Hrm, well I have not really looked at the hash algorithm but I assume
> we could just reduce the number of buckets?

No, we need fully equal hash keys, else the code won't visit the heap.

I guess one thing we could do for testing purposes is lobotomize one of
the datatype-specific hash functions.  For instance, make int8_hash
return the input mod 2^32, ignoring the upper bytes.  Then it'd be easy
to compute different int8s that hash to the same thing.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-09-05 02:19:05
Subject: Re: hash index improving v3
Previous:From: Tom LaneDate: 2008-09-05 02:04:57
Subject: Re: [HACKERS] TODO item: Implement Boyer-Moore searching (First time hacker)

pgsql-patches by date

Next:From: Tom LaneDate: 2008-09-05 02:19:05
Subject: Re: hash index improving v3
Previous:From: Tom LaneDate: 2008-09-05 02:04:57
Subject: Re: [HACKERS] TODO item: Implement Boyer-Moore searching (First time hacker)

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