pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Julien Rouhaud <rjuju123@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Douglas Doole <dougdoole@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Collation versioning
Date: Wed, 12 Feb 2020 21:18:32 +0100
Message-ID: <20200212201832.GB14732@nol> (raw)
In-Reply-To: <60627aa291848f46d96aec51544e191ed6baa1bc.camel@cybertec.at>
References: <CAOBaU_Y4f=scCxv675nv0Ef30z5Vvbh8JFRhibojfhA9_qB8Lw@mail.gmail.com>
<CAOBaU_ap+4uEgZV548NEgxzLTfqVsTdSy0+9S9wp32qYvXo2BA@mail.gmail.com>
<CA+hUKGK8CwBcTcXWL2kUjpHT+6t2hEFCzkcZ-Z7xXbz=C4NLCQ@mail.gmail.com>
<CAOBaU_Zg==075nNEhd+Du0x32q0ojHC1DJ86mBCW5JYKaosb5Q@mail.gmail.com>
<CAOBaU_bP70ybzc23E=Z38mygMAOThPG7Fog1Qoom5DNvsfq=Ng@mail.gmail.com>
<3ede40e7-5799-7096-dc5f-d7beda8e7145@2ndquadrant.com>
<CAOBaU_aS-KU3ZMtcpqYHsADMRSjbPwepL8grNqEXGKiPcd_9nQ@mail.gmail.com>
<CAOBaU_ZvdNzXZkYUNcm-rTWJnAdrTtTpZPfQEe1rjm_AQ66VLg@mail.gmail.com>
<20200212191326.GA72685@nol>
<60627aa291848f46d96aec51544e191ed6baa1bc.camel@cybertec.at>
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 <replaceable class="parameter">name</replaceable>
> </listitem>
> </varlistentry>
>
> + <varlistentry>
> + <term><literal>ALTER COLLATION</literal></term>
> + <listitem>
> + <para>
> + 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.
> + </para>
> + </listitem>
> + </varlistentry>
> +
> <varlistentry>
> <term><literal>SET ( <replaceable class="parameter">storage_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] )</literal></term>
> <listitem>
>
> 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.
view thread (188+ messages) latest in thread
Message-ID: <20200212201832.GB14732@nol>
Permalink: ../20200212201832.GB14732@nol/
Also on: postgresql.org/message-id/20200212201832.GB14732@nol
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: rjuju123@gmail.com, laurenz.albe@cybertec.at, peter.eisentraut@2ndquadrant.com, thomas.munro@gmail.com, robertmhaas@gmail.com, michael@paquier.xyz, dougdoole@gmail.com, myon@debian.org
Subject: Re: Collation versioning
In-Reply-To: <20200212201832.GB14732@nol>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox