From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Geoghegan <pg@heroku.com>
Cc: Marc-Olaf Jaschke <marc-olaf.jaschke@s24.com>
Cc: Postgres-Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Date: Tue, 22 Mar 2016 21:15:09 -0400
Message-ID: <20160323011509.GJ3127@tamriel.snowman.net> (raw)
In-Reply-To: <19132.1458688784@sss.pgh.pa.us>
References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com>
<9688.1458605021@sss.pgh.pa.us>
<CA+TgmoZE6ERMy7oJWhDVz_W=siZLMBBwBp1jxiuvjrROVN7anw@mail.gmail.com>
<CAM3SWZT04ZOVdh5j6kA4hX3kg3XLir28jsvrqT2Cxhv1QDy9kQ@mail.gmail.com>
<CAM3SWZRKdfKhBLRXzQtMK2WACC2oo_Lq=FWAup4-xvjxkUoEbA@mail.gmail.com>
<16214.1458615257@sss.pgh.pa.us>
<CAM3SWZQnF3AfMwJHVdjmfmy9T2D2esX04aTfwZo2kNvwUp8OEQ@mail.gmail.com>
<CAM3SWZTums8PyGAHUpj=3gpt-xiGbbLqUun3mKK8-aTh-z9R2A@mail.gmail.com>
<CA+TgmoYkvRZ6BfjRj3b68p2iuwXF5auaR2DLkpFaJj+LpZZu0A@mail.gmail.com>
<19132.1458688784@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > I was a little worried that it was too much to hope for that all libc
> > vendors on earth would ship a strxfrm() implementation that was actually
> > consistent with strcoll(), and here we are.
>
> Indeed. To try to put some scope on the problem, I made an idiot little
> program that just generates some random UTF8 strings and sees whether
> strcoll and strxfrm sort them alike. Attached are that program, a even
> more idiot little shell script that runs it over all available UTF8
> locales, and the results on my RHEL6 box. While de_DE seems to be the
> worst-broken locale, it's far from the only one.
>
> Please try this on as many platforms as you can get hold of ...
Results for Ubuntu 15.10:
Using LC_COLLATE = "C.UTF-8"
Using LC_CTYPE = "en_US.UTF-8"
C.UTF-8 good
Using LC_COLLATE = "de_DE.utf8"
Using LC_CTYPE = "en_US.UTF-8"
de_DE.utf8 good
Using LC_COLLATE = "en_AG.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_AG.utf8 good
Using LC_COLLATE = "en_AU.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_AU.utf8 good
Using LC_COLLATE = "en_BW.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_BW.utf8 good
Using LC_COLLATE = "en_CA.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_CA.utf8 good
Using LC_COLLATE = "en_DK.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_DK.utf8 good
Using LC_COLLATE = "en_GB.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_GB.utf8 good
Using LC_COLLATE = "en_HK.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_HK.utf8 good
Using LC_COLLATE = "en_IE.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_IE.utf8 good
Using LC_COLLATE = "en_IN.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_IN.utf8 good
Using LC_COLLATE = "en_NG.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_NG.utf8 good
Using LC_COLLATE = "en_NZ.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_NZ.utf8 good
Using LC_COLLATE = "en_PH.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_PH.utf8 good
Using LC_COLLATE = "en_SG.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_SG.utf8 good
Using LC_COLLATE = "en_US.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_US.utf8 good
Using LC_COLLATE = "en_ZA.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_ZA.utf8 good
Using LC_COLLATE = "en_ZM.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_ZM.utf8 good
Using LC_COLLATE = "en_ZW.utf8"
Using LC_CTYPE = "en_US.UTF-8"
en_ZW.utf8 good
Will try on others.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: sfrost@snowman.net, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pg@heroku.com, marc-olaf.jaschke@s24.com
Subject: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
In-Reply-To: <20160323011509.GJ3127@tamriel.snowman.net>
References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com> <9688.1458605021@sss.pgh.pa.us> <CA+TgmoZE6ERMy7oJWhDVz_W=siZLMBBwBp1jxiuvjrROVN7anw@mail.gmail.com> <CAM3SWZT04ZOVdh5j6kA4hX3kg3XLir28jsvrqT2Cxhv1QDy9kQ@mail.gmail.com> <CAM3SWZRKdfKhBLRXzQtMK2WACC2oo_Lq=FWAup4-xvjxkUoEbA@mail.gmail.com> <16214.1458615257@sss.pgh.pa.us> <CAM3SWZQnF3AfMwJHVdjmfmy9T2D2esX04aTfwZo2kNvwUp8OEQ@mail.gmail.com> <CAM3SWZTums8PyGAHUpj=3gpt-xiGbbLqUun3mKK8-aTh-z9R2A@mail.gmail.com> <CA+TgmoYkvRZ6BfjRj3b68p2iuwXF5auaR2DLkpFaJj+LpZZu0A@mail.gmail.com> <19132.1458688784@sss.pgh.pa.us> <20160323011509.GJ3127@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox