pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@heroku.com>
Cc: Marc-Olaf Jaschke <marc-olaf.jaschke@s24.com>
Cc: pgsql-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 00:10:52 -0400
Message-ID: <19477.1458619852@sss.pgh.pa.us> (raw)
In-Reply-To: <CAM3SWZQiesUyoYdk01E2D+yAasdbVjZK30kJFuxq2fvbtkRkzw@mail.gmail.com>
References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com>
	<CAM3SWZQiesUyoYdk01E2D+yAasdbVjZK30kJFuxq2fvbtkRkzw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Peter Geoghegan <pg@heroku.com> writes:
> At one point, Robert wrote a small self-contained tool to show OS
> strxfrm() blobs:
> http://www.postgresql.org/message-id/CA+TgmoaOCyQpo8HK9yr6VTuyknWWvqgo7JeXi2kb=gpNveKR+g@mail.gmail....

> It would be great if you showed us the output for your test case
> strings, both on an affected and on an unaffected system.

On RHEL6, I get

./strxfrm-binary de_DE.UTF-8 'eai' 'e aí'
"eai" -> 100c140108080801020202 (11 bytes)
"e aí" -> 100c140108080901020202010235 (14 bytes)

This seems a bit problematic, because these string sort in the other
order ("e aí" before "eai") according to sort(1) as well as Postgres
sorting code.

It's possible I've copied-and-pasted these multibyte characters wrong.
But if I haven't, this says that the strxfrm-based optimization is
unusably broken on a very large fraction of reasonably-modern
installations.  Quite aside from casting aspersions on the glibc guys,
how did we fail to notice this in our own testing?

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (79+ messages)  latest in thread

Message-ID: <19477.1458619852@sss.pgh.pa.us>
Permalink:  ../19477.1458619852@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19477.1458619852@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, 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: <19477.1458619852@sss.pgh.pa.us>
  References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com> <CAM3SWZQiesUyoYdk01E2D+yAasdbVjZK30kJFuxq2fvbtkRkzw@mail.gmail.com> <19477.1458619852@sss.pgh.pa.us>

* 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