Re: Please correct/improve wiki page about abbreviated keys bug - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Please correct/improve wiki page about abbreviated keys bug
Date
Msg-id CAM3SWZT4ab-7p5ZQE1VaZZpRuScS1umHFMisx9CeD2NsZ8whkA@mail.gmail.com
Whole thread Raw
In response to Re: Please correct/improve wiki page about abbreviated keys bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Please correct/improve wiki page about abbreviated keys bug
List pgsql-hackers
On Tue, Mar 29, 2016 at 7:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> A corrupt index could easily fail to detect uniqueness violations (because
> searches fail to find entries they should find).  Not sure I believe that
> it would make false reports of a uniqueness conflict that's not really
> there.

Sure. But looking at how texteq() is implemented, it certainly seems
impossible that that could happen. Must have been a miscommunication
somewhere. I'll fix it.

Do you think it would be okay if the SQL query to detect potentially
affected indexes only considered the leading attribute? Since that's
the only attribute that could use abbreviated keys, it ought to be
safe to not require users to REINDEX indexes that happen to have a
second-or-subsequent text/varchar(n) attribute that doesn't use the C
locale. Maybe it's not worth worrying about.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Please correct/improve wiki page about abbreviated keys bug
Next
From: Peter Geoghegan
Date:
Subject: Re: Using quicksort for every external sort run