pgsql: Disable abbreviated keys for string-sorting in non-C locales.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Disable abbreviated keys for string-sorting in non-C locales.
Date: 2016-03-23 20:07:10
Message-ID: E1aip3e-000670-Cl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Disable abbreviated keys for string-sorting in non-C locales.

Unfortunately, every version of glibc thus far tested has bugs whereby
strcoll() ordering does not match strxfrm() ordering as required by
the standard. This can result in, for example, corrupted indexes.
Disabling abbreviated keys in these cases slows down non-C-collation
string sorting considerably, but there seems to be no practical
alternative. Users who are confident that their libc implementations
are solid in this regard can re-enable the optimization by compiling
with TRUST_STRXFRM.

Users who have built indexes using PostgreSQL 9.5 or PostgreSQL 9.5.1
should REINDEX if there is a possibility that they may have been
affected by this problem.

Report by Marc-Olaf Jaschke. Investigation mostly by Tom Lane, with
help from Peter Geoghegan, Noah Misch, Stephen Frost, and me. Patch
by me, reviewed by Peter Geoghegan and Tom Lane.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3df9c374e279db37b00cd9c86219471d0cdaa97c

Modified Files
--------------
src/backend/utils/adt/varlena.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-03-24 00:22:22 pgsql: Move keywords.c/kwlookup.c into src/common/.
Previous Message Robert Haas 2016-03-23 16:52:55 pgsql: postgres_fdw: Fix crash when pushing down multiple joins.