Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1is8zk-0007ue-KL for pgsql-general@arkaria.postgresql.org; Thu, 16 Jan 2020 17:31:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1is8zj-00006h-6M for pgsql-general@arkaria.postgresql.org; Thu, 16 Jan 2020 17:31:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1is8zi-0008Ts-Pc for pgsql-general@lists.postgresql.org; Thu, 16 Jan 2020 17:31:46 +0000 Received: from polemos.matrix.org ([94.237.46.156]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1is8zc-0002U1-Dh for pgsql-general@lists.postgresql.org; Thu, 16 Jan 2020 17:31:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=matrix.org; s=polemos; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=npxxLkuQ6Rxy0jpAlVr4H/E0X5WrxaZScKGeMQ2BtYo=; b=Ln2nK0RB5uqM6oV4DP1Ye7X1wa 5E7G64TUUKE0ABMoRgEye6nJyxQErd7JB4w7i133RHSUMT7C9cTijBIh0XDC0rdK5UccvbqowbsmI qOrRqq/pdR7SbfXnUx0WJNCoF4InQ7Re+f8nnzXX9+WPD6/ep7wCkzF/voZtmchGaXm+8VmDve+E0 sFhTv+YzcIQjQw1RGxzBfPnD4FD3i6HB9sjy/Dz8bXppMh5s9oT/Fum7xsBMCBxh7MK6ze+KYWWkX bWyWexA8i6HzyHAl9kTd+lLjqPLjsi1ufJKuuPOIglRy8VfZNNp7HnLEf31qzvj0uJ7Ro+lufp3DN y7D8R9enBfMVO2cJdyT8zw8gqdYGYiCV7WUsH1LxZ9nZdWScgPHjnAV84Xajnde6n0d94lKBi6n/R gZhVqzHnMtkCwNbXZYsFgkwoTfxky0LMSOaYwlO8jOYma+Cj2VIe65/I7qfi46tMzXicZ4OP63MFw yrAj5Y0IdYYmoQt2ApuDLIVnCWN25+IZxs9Rlf8KvScoJYplAyVacL3VMCJy1e9LCzElWE+DGUpVW +Z6pcLDXGJWIVT5qNeC2Ve1ZpADTKieJMVZi21kQkReU6bJ0fDI5RsQaYcj0ua8ONtDBKS49QJF39 JXpHTQIAyAU0I/0TI/yQ3PfAMIFAk5SNy0myyyqBI=; Received: from [2001:8b0:ba7a:e98f:2d18:c4bf:423e:ed6f] by polemos.matrix.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1is8zb-00007u-0o; Thu, 16 Jan 2020 17:31:39 +0000 Subject: Re: Inexplicable duplicate rows with unique constraint To: Adrian Klaver , pgsql-general@lists.postgresql.org References: <288488b7-d3b6-905b-3706-43f7a3c7bc52@matrix.org> <1605.1579194518@sss.pgh.pa.us> From: Richard van der Hoff Message-ID: <9265a081-adfd-4792-5385-70cc09a39baa@matrix.org> Date: Thu, 16 Jan 2020 17:31:38 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 16/01/2020 17:27, Adrian Klaver wrote: > On 1/16/20 9:24 AM, Richard van der Hoff wrote: >> >> It seems like a plausible explanation but it's worth noting that all >> the indexed data here is (despite being in text columns), plain ascii. >> I'm surprised that a change in collation rules would change the >> sorting of such strings, and hence that it could lead to this problem. >> Am I naive? > > In psql who does: > > \l the_database_name > > show? synapse=> \l synapse List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges ---------+----------+----------+-------------+-------------+----------------------- synapse | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres+ | | | | | =Tc/postgres + | | | | | synapse=CTc/postgres (1 row)