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 1hG4GR-0003Ey-Qn for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Apr 2019 16:15:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hG4GQ-0007wj-Fx for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Apr 2019 16:15:22 +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 1hG4GQ-0007wc-4t for pgsql-bugs@lists.postgresql.org; Mon, 15 Apr 2019 16:15:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hG4GJ-0008Ci-CO for pgsql-bugs@lists.postgresql.org; Mon, 15 Apr 2019 16:15:21 +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 x3FGFDY1016626; Mon, 15 Apr 2019 12:15:13 -0400 From: Tom Lane To: suresh.thelkar@altair.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15755: After upgrading to 9.6.12 using pg_upgrade, select query does not return the expected results. In-reply-to: <15755-a5d9a0bea7ca931a@postgresql.org> References: <15755-a5d9a0bea7ca931a@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 15 Apr 2019 08:02:55 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16624.1555344913.1@sss.pgh.pa.us> Date: Mon, 15 Apr 2019 12:15:13 -0400 Message-ID: <16625.1555344913@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > When we upgraded Postgres from 9.3.12 to 9.6.12 we observed that queries > like the following are no longer giving the expected results. > select * from xyz.job_attr where jobid = 'foo'; > [ but reindexing fixed it ] What collation locale do you use in that database? (psql \l's "Collate" column would say.) If it's not "C", the most likely explanation is that you also upgraded the underlying OS, and glibc's sort order for that locale changed from what it was before. If so, reindexing is the appropriate cure. There isn't a lot we can do about this inside Postgres, because we have no visibility into whether a locale's behavior is different today than it was yesterday :-( regards, tom lane