lc_collate values for database "postgres" do not match: old "C.UTF-8", new "en_US.UTF-8" I am working on testing a method for postgres 9.3 to 10 upgrade. I currently am at the dry run phase and ran into a few issues. The current blocking one is lc_collate values for database "postgres" do not match:  old "C.UTF-8", new "en_US.UTF-8", I get this when I run the below command:

time ${PGBINNEW}/pg_upgrade --old-bindir=${PGBINOLD} --new-bindir=${PGBINNEW} --old-datadir=${PGDATAOLD} --new-datadir=${PGDATANEW} --old-port=${PGPORT} --new-port=$5433 --jobs=$(nproc | awk '{ {print ($1 &gt; 4) ? 4 : ($1 == 1 ? 1 : $1 - 1)} }') --link --username=postgres --check


Any ideas on what might be happening here?
I solved this thanks to Reddit post. It was fairly simple when combined with another part of my testing.

I used the code {PGBINNEW}/initdb --pgdata="$PGDATANEW" --encoding=UTF8 --no-locale to reinit the DB AFTER I did the below command:

sudo rm -rf ${PGBASEDIR}/data10


What happened was I cleared the old DB init config and then put in the config I needed without the localization of the database