Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Marc-Olaf Jaschke <marc-olaf(dot)jaschke(at)s24(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Date: 2016-03-22 01:09:53
Message-ID: CAM3SWZRQ8XKOxaNDMYhovfqQUoPEo2Jw_brT7iV79p2NA7w8Hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, Mar 21, 2016 at 1:40 PM, Marc-Olaf Jaschke
<marc-olaf(dot)jaschke(at)s24(dot)com> wrote:
> I was able to reproduce this with
>
> cat /etc/debian_version
> 6.0.1
> PostgreSQL 9.5.0 on x86_64-pc-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit
> /lib/libc.so.6 > GNU C Library (Debian EGLIBC 2.11.3-3) stable release version 2.11.3, by Roland McGrath et al.
>
> CentOS release 6.7 (Final)
> PostgreSQL 9.5.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16), 64-bit
> ldd --version
> ldd (GNU libc) 2.12

I found this fairly recent bug report concerning glibc's strxfrm():

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803927

(See also https://sourceware.org/bugzilla/show_bug.cgi?id=16009)

I'm not certain that this is the problem, but it's a good theory. Note
that this particular message talks about your exact affected version
of eglibc (eglibc-2.11.3):

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803927#27

Even if it isn't this exact issue, I have a really hard time imagining
that this is not a bug in the relevant Glibc versions. Abbreviated
keys are fundamentally a fairly simple idea, and it's hard to think of
any other possible explanation.

We'll know more when we use those strxfrm() blobs, from the tool I linked to.

--
Peter Geoghegan

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2016-03-22 01:15:42 Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Previous Message Reece Pegues 2016-03-22 00:47:23 Re: BUG #14038: substring cuts unicode char in half, allowing to save broken utf8 into table

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2016-03-22 01:15:42 Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Previous Message Michael Paquier 2016-03-22 00:59:34 Re: Request - repeat value of \pset title during \watch interations