Re: machine-dependent hash_any vs the regression tests - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: machine-dependent hash_any vs the regression tests
Date
Msg-id 87zls8aqdk.fsf@oxford.xeocode.com
Whole thread Raw
In response to machine-dependent hash_any vs the regression tests  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: machine-dependent hash_any vs the regression tests  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> No doubt that can be worked around, but does anyone wish to argue that
> this whole thing is a bad path to be headed down?  We're not going to
> gain a *whole* lot of speedup from the word-wide-hashing change, and
> so maybe this type of headache isn't worth the trouble.

I have to admit to some hesitation about it. But as you point out, regarding
arrays of integers, most of the things being hashed are themselves platform
dependent and have different hashes. So I can't really come up with any good
reason to try to keep hashes consistent across platforms.

I suppose for strings it means you can't use hashtext() in user-space code if
you ever think you might switch database server architectures. You're probably
better off using crc32 (for which we don't provide a function :( ) for user
code anyways.

Why do we have this hash function anyways? Is hashany faster than a decent
crc32 implementation?

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: machine-dependent hash_any vs the regression tests
Next
From: Tom Lane
Date:
Subject: Re: machine-dependent hash_any vs the regression tests