Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F2FD32E0069 for ; Sun, 16 Mar 2008 23:53:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 47486-01 for ; Sun, 16 Mar 2008 23:52:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 55FF32E003E for ; Sun, 16 Mar 2008 23:53:04 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m2H2r3sl021780; Sun, 16 Mar 2008 22:53:03 -0400 (EDT) To: Kenneth Marshall cc: pgsql-patches@postgresql.org, twraney@comcast.net, neilc@samurai.com Subject: Re: updated hash functions for postgresql v1 In-reply-to: <20071027201557.GW27320@it.is.rice.edu> References: <20071027201557.GW27320@it.is.rice.edu> Comments: In-reply-to Kenneth Marshall message dated "Sat, 27 Oct 2007 15:15:58 -0500" Date: Sun, 16 Mar 2008 22:53:02 -0400 Message-ID: <21779.1205722382@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/214 X-Sequence-Number: 5277 Kenneth Marshall writes: > Dear PostgreSQL Developers, > This patch is a "diff -c" against the hashfunc.c from postgresql-8.3beta1. It's pretty obvious that this patch hasn't even been tested on a big-endian machine: > + #ifndef WORS_BIGENDIAN However, why do we need two code paths anyway? I don't think there's any requirement for the hash values to come out the same on little- and big-endian machines. In common cases the byte-array data being presented to the hash function would be different to start with, so you could hardly expect identical hash results even if you had separate code paths. I don't find anything very compelling about 64-bit hashing, either. We couldn't move to that without breaking API for hash functions of user-defined types. Given all the other problems with hash indexes, the issue of whether it's useful to have more than 2^32 hash buckets seems very far off indeed. regards, tom lane