From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: Christophe Pettus <xof@thebuild.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Q: fixing collation version mismatches
Date: Sun, 13 Nov 2022 22:58:37 +0100
Message-ID: <Y3FojZ4gPMoJuMfx@hermes.hilbert.loc> (raw)
In-Reply-To: <B083C0A7-50DA-4CC1-A837-BB6B3FF2A3BE@thebuild.com>
References: <Y3FXbJiKcp04HEER@hermes.hilbert.loc>
<B083C0A7-50DA-4CC1-A837-BB6B3FF2A3BE@thebuild.com>
Am Sun, Nov 13, 2022 at 12:46:53PM -0800 schrieb Christophe Pettus:
> > On Nov 13, 2022, at 12:45, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
> > REINDEX DATABASE db_in_question;
> > ALTER DATABASE db_in_question REFRESH COLLATION VERSION;
> > ALTER COLLATION every_collation_from_pg_collation REFRESH VERSION;
>
> I may be totally off-base here, but shouldn't the REINDEX be the last step?
To my understanding, the REFRESH statements "merely" update
the version information stored in the related objects. They
do not change anything else; and the REINDEX does not
reference them in any way.
I suppose the REINDEX goes first as it does the actual fixing
of now-invalid objects by rebuilding them. After that one is
back to a usable database state, even if left with pesky
(albeit harmless) warnings on version mismatches -- which to
get rid of one runs the REFRESH statements.
Or so my understanding...
Which is why my question still stands: does the above
three-strikes operation safely take care of any collation
issues that may currently exist in a database ?
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: Karsten.Hilbert@gmx.net, xof@thebuild.com
Subject: Re: Q: fixing collation version mismatches
In-Reply-To: <Y3FojZ4gPMoJuMfx@hermes.hilbert.loc>
References: <Y3FXbJiKcp04HEER@hermes.hilbert.loc> <B083C0A7-50DA-4CC1-A837-BB6B3FF2A3BE@thebuild.com> <Y3FojZ4gPMoJuMfx@hermes.hilbert.loc>
* 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