From: Andrew Dunstan <andrew@dunslane.net>
To: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_upgrade: copy locale and encoding information to new cluster.
Date: Thu, 9 Mar 2023 12:21:35 -0500
Message-ID: <0a364430-266e-1e1a-d5d8-1a5273c9ddb6@dunslane.net> (raw)
In-Reply-To: <E1paJJm-002i7N-Dh@gemulon.postgresql.org>
References: <E1paJJm-002i7N-Dh@gemulon.postgresql.org>
On 2023-03-09 Th 11:40, Jeff Davis wrote:
> pg_upgrade: copy locale and encoding information to new cluster.
>
> Previously, pg_upgrade checked that the old and new clusters were
> compatible, including the locale and encoding. But the new cluster was
> just created, and only template0 from the new cluster will be
> preserved (template1 and postgres are both recreated during the
> upgrade process).
>
> Because template0 is not sensitive to locale or encoding, just update
> the pg_database entry to be the same as template0 from the original
> cluster.
>
> This commit makes it easier to change the default initdb locale or
> encoding settings without causing needless incompatibilities.
This looks like it broke cross version upgrade testing. Old versions
don't have datlocprovider.
See
<https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=crake&dt=2023-03-09%2016%3A47%3A03...;:
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
SQL command failed
SELECT encoding, datlocprovider, datcollate, datctype, daticulocale FROM pg_catalog.pg_database WHERE datname='template0'
ERROR: column "datlocprovider" does not exist
LINE 1: SELECT encoding, datlocprovider, datcollate, datctype...
^
Failure, exiting
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
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-committers@postgresql.org
Cc: andrew@dunslane.net, jdavis@postgresql.org
Subject: Re: pgsql: pg_upgrade: copy locale and encoding information to new cluster.
In-Reply-To: <0a364430-266e-1e1a-d5d8-1a5273c9ddb6@dunslane.net>
References: <E1paJJm-002i7N-Dh@gemulon.postgresql.org> <0a364430-266e-1e1a-d5d8-1a5273c9ddb6@dunslane.net>
* 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