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 1kFjMz-0003rY-Tf for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2020 19:33:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFjMy-0002Cs-11 for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2020 19:33:32 +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 1kFjMx-0002Cl-Qi for pgsql-hackers@lists.postgresql.org; Tue, 08 Sep 2020 19:33:31 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFjMv-0002Bx-R0 for pgsql-hackers@postgresql.org; Tue, 08 Sep 2020 19:33:31 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1471:c340:76e5:bff:fef3:7e00]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4BmFgV6XKQz3F0h; Tue, 8 Sep 2020 21:33:26 +0200 (CEST) Date: Tue, 8 Sep 2020 21:33:26 +0200 From: Christoph Berg To: Julien Rouhaud Cc: Michael Paquier , Thomas Munro , Peter Eisentraut , Robert Haas , Laurenz Albe , Douglas Doole , Pg Hackers Subject: Re: Collation versioning Message-ID: <20200908193326.GA108231@msg.df7cb.de> Mail-Followup-To: Christoph Berg , Julien Rouhaud , Michael Paquier , Thomas Munro , Peter Eisentraut , Robert Haas , Laurenz Albe , Douglas Doole , Pg Hackers References: <20200708062620.GD18003@paquier.xyz> <13b0c950-80f9-4c10-7e0f-f59feac56a98@2ndquadrant.com> <20200813095204.f7mlgdzsbaxa3mzr@nol> <20200814073746.GF2057@paquier.xyz> <20200814090235.ifld2qvaw43pzpzg@nol> <20200907031741.GK2455@paquier.xyz> <20200908144507.GA57691@nol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200908144507.GA57691@nol> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Re: Julien Rouhaud > Here's the rationale for this new flag, extracted from the patch's commit > message: > > Add a new amnostablecollorder flag in IndexAmRoutine. > > This flag indicates if the access method does not rely on a stable collation > ordering for deterministic collation, i.e. would not be corrupted if the > underlying collation library changes its ordering. This is done this way to > make sure that if any external access method isn't updated to correctly setup > this flag it will be assumed to rely on a stable collation ordering as this > should be the case for the majority of access methods. > > This flag will be useful for an upcoming commit that will add detection of > possibly corrupted index due to changed collation library version. Hmm. Does that flag gain us much? What about non-collation locale changes that might still affect indexes like lower() and the citext extension? That still depends on locale changes, but that flag wouldn't be able to help with "this index is (not) affected by this locale change". IOW, I think we should aim at simply tracking the version, and leave it to the admin (with the help of supplied SQL queries) to either rebuild indexes or waive them. Or maybe I misunderstood the problem. Christoph