From: Tom Lane <tgl@sss.pgh.pa.us>
To: Don Seiler <don@seiler.us>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Mixed Locales and Upgrading
Date: Tue, 17 Mar 2020 10:45:50 -0400
Message-ID: <1182.1584456350@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHJZqBDAqGbgAHxVQ1rG1QmKPpkqU_W8yi82EdqA-o_0WgaLYw@mail.gmail.com>
References: <CAHJZqBAS6kuTWZwSbu8KqfhJ8dapvTegyA1QweAHAmmQveUyRA@mail.gmail.com>
<5624.1584372534@sss.pgh.pa.us>
<CAHJZqBD0tv8VswMA7o=8L4DwVKWVxyx9cCv-xzr6-ZQke3GZ8Q@mail.gmail.com>
<31606.1584453361@sss.pgh.pa.us>
<CAHJZqBDAqGbgAHxVQ1rG1QmKPpkqU_W8yi82EdqA-o_0WgaLYw@mail.gmail.com>
Don Seiler <don@seiler.us> writes:
> On Tue, Mar 17, 2020 at 8:56 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yikes. Well, if there aren't obvious operational problems, it might be
>> that the data is actually UTF8-clean, or almost entirely so. Maybe you
>> could look at the problem as being one of validation.
> For this test, would we restore into an en_US.UTF-8/UTF8 database? Then,
> assuming no errors (or fixing any errors until clean), we change the
> datcollate/datctype settings in prod and proceed with pg_upgrade (obviously
> after testing all of that heavily)?
Yeah, that's the basic idea.
> What are the ramifications of changing collation like that? Should we
> consider rebuilding indexes ASAP after that?
Text indexes would definitely be at risk here. I'm not really certain
how bad the problem would be. Do you have a feeling for how much of
the data is 100% ASCII? If you could be sure of that for any given
column, you wouldn't have to reindex indexes on that column.
regards, tom lane
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: tgl@sss.pgh.pa.us, don@seiler.us
Subject: Re: Mixed Locales and Upgrading
In-Reply-To: <1182.1584456350@sss.pgh.pa.us>
References: <CAHJZqBAS6kuTWZwSbu8KqfhJ8dapvTegyA1QweAHAmmQveUyRA@mail.gmail.com> <5624.1584372534@sss.pgh.pa.us> <CAHJZqBD0tv8VswMA7o=8L4DwVKWVxyx9cCv-xzr6-ZQke3GZ8Q@mail.gmail.com> <31606.1584453361@sss.pgh.pa.us> <CAHJZqBDAqGbgAHxVQ1rG1QmKPpkqU_W8yi82EdqA-o_0WgaLYw@mail.gmail.com> <1182.1584456350@sss.pgh.pa.us>
* 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