On Fri, Sep 29, 2017 at 1:57 PM, Peter Geoghegan <p...@bowt.ie> wrote:
> On Fri, Sep 29, 2017 at 10:29 AM, Robert Haas <robertmh...@gmail.com> wrote:
>> I am also wondering whether this patch should consider
>> 81c5e46c490e2426db243eada186995da5bb0ba7 as a way of obtaining
>> multiple hash values.  I suppose that's probably inferior to what is
>> already being done on performance grounds, but I'll just throw out a
>> mention of it here all the same in case it was overlooked or the
>> relevance not spotted...
>
> Well, we sometimes only want one hash value. This happens when we're
> very short on memory (especially relative to the estimated final size
> of the set), so it's a fairly common requirement. And, we have a
> convenient way to get a second independent uint32 hash function now
> (murmurhash32()).

Right, so if you wanted to use the extended hash function
infrastructure, you'd just call the extended hash function with as
many different seeds as the number of hash functions you need.  If you
need 1, you call it with one seed, say 0.  And if you need any larger
number, well, cool.

Like I say, I'm not at all sure this is better than what you've got
right now.  But it's an option.

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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to