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&stg=xversion-upgrade-REL9_2_STABLE-HEAD>:
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