From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_upgrade: copy locale and encoding information to new cluster.
Date: Thu, 09 Mar 2023 16:40:38 +0000
Message-ID: <E1paJJm-002i7N-Dh@gemulon.postgresql.org> (raw)
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.
Discussion: https://postgr.es/m/d62b2874-729b-d26a-2d0a-0d64f509eca4@enterprisedb.com
Reviewed-by: Peter Eisentraut
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9637badd9f9209166140eb567602e91699dd2ffb
Modified Files
--------------
src/bin/pg_upgrade/Makefile | 2 +
src/bin/pg_upgrade/check.c | 160 ---------------------------------
src/bin/pg_upgrade/info.c | 69 ++++++++++----
src/bin/pg_upgrade/meson.build | 1 +
src/bin/pg_upgrade/pg_upgrade.c | 62 +++++++++++++
src/bin/pg_upgrade/pg_upgrade.h | 12 ++-
src/bin/pg_upgrade/t/002_pg_upgrade.pl | 69 +++++++++++++-
7 files changed, 192 insertions(+), 183 deletions(-)
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: jdavis@postgresql.org
Subject: Re: pgsql: pg_upgrade: copy locale and encoding information to new cluster.
In-Reply-To: <E1paJJm-002i7N-Dh@gemulon.postgresql.org>
References: <E1paJJm-002i7N-Dh@gemulon.postgresql.org>
* 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