Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiDer-0000dc-Uw for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Mar 2016 04:11:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aiDer-0005Do-He for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Mar 2016 04:11:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aiDeq-0005C3-Gt for pgsql-bugs@postgresql.org; Tue, 22 Mar 2016 04:11:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aiDeh-0004Of-PR for pgsql-bugs@postgresql.org; Tue, 22 Mar 2016 04:11:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u2M4AqZR019478; Tue, 22 Mar 2016 00:10:52 -0400 From: Tom Lane To: Peter Geoghegan cc: Marc-Olaf Jaschke , pgsql-bugs Subject: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5) In-reply-to: References: <111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com> Comments: In-reply-to Peter Geoghegan message dated "Mon, 21 Mar 2016 17:34:17 -0700" Date: Tue, 22 Mar 2016 00:10:52 -0400 Message-ID: <19477.1458619852@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Peter Geoghegan 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.com > 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