Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kB4ML-0007Tf-St for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Aug 2020 22:57:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kB4MK-0002qZ-Kf for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Aug 2020 22:57:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kB4MK-0002qS-Dw for pgsql-bugs@lists.postgresql.org; Wed, 26 Aug 2020 22:57:36 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kB4MH-0006J1-UG for pgsql-bugs@lists.postgresql.org; Wed, 26 Aug 2020 22:57:36 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kB4ME-0005N6-UV; Wed, 26 Aug 2020 18:57:30 -0400 Date: Wed, 26 Aug 2020 18:57:30 -0400 From: Bruce Momjian To: Magnus Hagander Cc: Nick Cleaton , hali19790320@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #16593: pg_upgrade make corrupt UK indexes Message-ID: <20200826225730.GD13370@momjian.us> References: <16593-875efda911c9b799@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Aug 26, 2020 at 09:49:00AM +0200, Magnus Hagander wrote: > > > On Wed, Aug 26, 2020 at 7:38 AM Nick Cleaton wrote: > > On Tue, 25 Aug 2020 at 23:55, PG Bug reporting form > wrote: > > We upgrade from 9.6 Centos7 to 12.3 Centos 8 > > > This from https://www.postgresql.org/docs/12/amcheck.html#id-1.11.7.11.9 > might be relevent: > > > Comparisons of datums of a collatable type like text must be immutable > (just as all comparisons used for B-Tree index scans must be immutable), > which implies that operating system collation rules must never change. > Though rare, updates to operating system collation rules can cause these > issues. More commonly, an inconsistency in the collation order between a > master server and a standby server is implicated, possibly because the > major operating system version in use is inconsistent > > > And in particular also see https://wiki.postgresql.org/wiki/Locale_data_changes > , which shows that the step from Centos7 to Centos8 is one that causes this > problem. You need to reindex all text/varchar indexes when you  make that > upgrade. And we should have a script ready for people to do this. :-) -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee