Hash index on macaddr -> crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Hash index on macaddr -> crash
Date: 2000-12-08 21:07:21
Message-ID: 3343.976309641@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-12-08 21:21:21 Re: Re: CRC
Previous Message Nathan Myers 2000-12-08 21:00:27 Re: Re: CRC