Hash index on macaddr -> crash - Mailing list pgsql-hackers

From Tom Lane
Subject Hash index on macaddr -> crash
Date
Msg-id 3343.976309641@sss.pgh.pa.us
Whole thread Raw
Responses RE: Hash index on macaddr -> crash  ("Darren King" <darrenk@insightdist.com>)
List pgsql-hackers
It was just pointed out on pggeneral that hash indexes on macaddr
columns don't work.  Looking into it, I find that someone (me :-()
made a booboo: pg_amproc claims that hashvarlena is the appropriate
hash function for macaddr --- but macaddr isn't a varlena type,
it's a fixed-length pass-by-reference type.

We could fix this either by adding a new hash function to support
macaddr, or by removing the pg_amXXX entries that claim macaddr is
hashable.  Either change will not take effect without an initdb,
however, and I'm loath to force one now that we've started beta.

What I'm inclined to do is add the hash function but not force an
initdb (ie, not increment catversion).  That would mean that people
running 7.1beta1 would still have the bug in 7.1 final if they don't
choose to do an initdb when they update.  But hashing macaddr isn't
very common (else we'd have noticed sooner!) so this seems OK, and
better than forcing an initdb on our beta testers.

Comments, objections?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: CRC
Next
From: Bruce Guenter
Date:
Subject: Re: Re: CRC