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 1j1yRE-0006Od-Vl for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2020 20:16:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j1yRC-0007GS-Ng for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2020 20:16:46 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1j1yRC-0007GL-EC for pgsql-hackers@lists.postgresql.org; Wed, 12 Feb 2020 20:16:46 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j1yRA-0004ou-Co for pgsql-hackers@postgresql.org; Wed, 12 Feb 2020 20:16:46 +0000 Received: by mail-wm1-x344.google.com with SMTP id p9so3773547wmc.2 for ; Wed, 12 Feb 2020 12:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dpYf9mTukUtohhG6ch12cmuNNO7LhXHDDr81qi5EcKM=; b=f2ZAniMPH8lcSYl4Rl1nyfNbjAPG6D7U6Nd7OERBCl0aR70ItbyB16Ddx5lqJMRX4w XSwolqKSAt4xKSzNTkH6SPuXpNsY3ziOFIb6/fk+hCW+N3D2RRgcyHBhA6HzymZMmKEE zYKdXXx3VkmFBGzRhOieJnoubVXkh9Ki3HyYm+zC1jfz8kT98nBzuW83NNdzD90GcsaC 7AtLazDKvYcnnxtXIlfAgBw3MXq8lKZakXoktzgyYGCkeqQHFdXL1nieyjJMLoB7Kz+7 svhwBu5QGiwJS785ALRu4QuR0T2bDO4ISWwOxPD87ir6RSXw+gXH3LJjUm3brIkX0act b3hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dpYf9mTukUtohhG6ch12cmuNNO7LhXHDDr81qi5EcKM=; b=LEcxugJlO+063SfLhinCjMDd7DxDXDdiuY2A2u5nPU5WCQ8unL5IFH/VjNMre+0ePh ZhKRUsyRK9frlFAGVhRmZO/KCn5r4Ai58KHTwQy9yilJBREev2ZLozWf6S35h1Wa7RnG 2KXdbHq+YldtoAA4Dr5ObN3mdlcv1vFzzTqN9c269+F9+UObnnkGvyWMYXME7TueLPXa WfDEorn0K3aE5DOV8na3hz4u4Yp3+JJb9BidxeIIzumLV7Dlql5XhewGVoKgSIWK7Pv7 URy2g22YqF4y1NCKRGDBGo1ggjVPNwQDs8TJGGb59bRMOSObEzwZr5H50W3TT/Cyo3j3 Dv3g== X-Gm-Message-State: APjAAAXJF/19OWbKBGvTUEI6tGQ7q9D04Wtf0g1VlI/xI2WckWyrMV6Y lic8UdSzcQ2YBj2Ux3x0hQY= X-Google-Smtp-Source: APXvYqxLROi41FzvAvzWrW3hCHfYkqtBl48pGhk3PxM1vzxDq4bi1WztlWb5lmOBspoeWYVU7GH6rg== X-Received: by 2002:a05:600c:285:: with SMTP id 5mr808822wmk.120.1581538603522; Wed, 12 Feb 2020 12:16:43 -0800 (PST) Received: from nol ([2a01:e0a:c:bcf0:dbc8:f7e9:89ae:5cd7]) by smtp.gmail.com with ESMTPSA id w26sm1975197wmi.8.2020.02.12.12.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 12:16:42 -0800 (PST) Date: Wed, 12 Feb 2020 21:18:32 +0100 From: Julien Rouhaud To: Laurenz Albe Cc: Peter Eisentraut , Thomas Munro , Robert Haas , Michael Paquier , Douglas Doole , Christoph Berg , Pg Hackers Subject: Re: Collation versioning Message-ID: <20200212201832.GB14732@nol> References: <3ede40e7-5799-7096-dc5f-d7beda8e7145@2ndquadrant.com> <20200212191326.GA72685@nol> <60627aa291848f46d96aec51544e191ed6baa1bc.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60627aa291848f46d96aec51544e191ed6baa1bc.camel@cybertec.at> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Feb 12, 2020 at 08:55:06PM +0100, Laurenz Albe wrote: > On Wed, 2020-02-12 at 20:13 +0100, Julien Rouhaud wrote: > > On Wed, Feb 05, 2020 at 05:17:25PM +0100, Julien Rouhaud wrote: > > > Note that I didn't change any syntax (or switched to native functions > > > for the binary pg_dump) as it's still not clear to me what exactly > > > should be implemented. > > > > Hearing no complaints on the suggestions, I'm attaching v8 to address that: > > > > - pg_dump is now using a binary_upgrade_set_index_coll_version() function > > rather than plain DDL > > - the additional DDL is now of the form: > > ALTER INDEX name ALTER COLLATION name REFRESH VERSION > > > > I also added an alternate file for the collate.icu.utf8, so the build farm bot > > should turn green for the linux part. > > diff --git a/doc/src/sgml/ref/alter_index.sgml b/doc/src/sgml/ref/alter_index.sgml > index 6d34dbb74e..8661b031e9 100644 > --- a/doc/src/sgml/ref/alter_index.sgml > +++ b/doc/src/sgml/ref/alter_index.sgml > @@ -109,6 +110,18 @@ ALTER INDEX ALL IN TABLESPACE name > > > > + > + ALTER COLLATION > + > + > + This form update the index existing dependency on a specific collation, > + to specificy the the currently installed collation version is compatible > + with the version used the last time the index was built. Be aware that > + an incorrect use of this form can hide a corruption on the index. > + > + > + > + > > SET ( storage_parameter = value [, ... ] ) > > > This description could do with some love. Perhaps: > > This command declares that the index is compatible with the currently > installed version of the collations that determine its order. It is used > to silence warnings caused by collation > version incompatibilities and > should be called after rebuilding the index or otherwise verifying its > consistency. Be aware that incorrect use of this command can hide > index corruption. Thanks a lot, that's indeed way better! I'll add it in the round of patch. > I didn't study the patch in detail, but do I get it right that there will be no > warnings about version incompatibilities with libc collations? No, libc is also be supported (including the default collation), as long as we have a way to get the version. Unfortunately, that means only linux/glibc. I think that there was some previous discussion to work around that limitation for other systems, using some kind of hash of the underlying collation files, as Peter mentioned recently, but that's not part of this patchset.