pgsql: pg_upgrade: copy locale and encoding information to new cluster. - Mailing list pgsql-committers

From Jeff Davis
Subject pgsql: pg_upgrade: copy locale and encoding information to new cluster.
Date
Msg-id E1paJJm-002i7N-Dh@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: pg_upgrade: copy locale and encoding information to new cluster.  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: pgsql: For Kerberos testing, disable reverse DNS lookup
Next
From: Andrew Dunstan
Date:
Subject: Re: pgsql: pg_upgrade: copy locale and encoding information to new cluster.