lc_collate mess

Started by Susanne & Udo Krauseover 5 years ago2 messagesbugs
Jump to latest
#1Susanne & Udo Krause
su.krause@bluewin.ch

Hi there,

the new PostgreSQL has been created from scratch by standard
installation with German_Switzerland, then it does not know:

------------------------------------------------------------------------

C:\Users\postgres\Documents>pg_upgrade.exe --old-datadir "C:/Program
Files/PostgreSQL/12/data" --new-datadir "C:/Program
Files/PostgreSQL/13/data" --old-bindir "C:/Program
Files/PostgreSQL/12/bin" --new-bindir "C:/Program
Files/PostgreSQL/13/bin" --check
Führe Konsistenzprüfungen durch
-------------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok

lc_collate-Werte für Datenbank »postgres« stimmen nicht überein: alt
»German_Switzerland.1252«, neu »German_Germany.1252«
Fehlgeschlagen, Programm wird beendet

C:\Users\postgres\Documents>

------------------------------------------------------------------------

where is a hint how to fix that? New PostgreSQL did not yet start up, of
course.

Previous migration vom PostgreSQL 9 to PostgreSQL 12 was a messy
nightmare, still not okay.

Thanks in advance

Udo.

#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Susanne & Udo Krause (#1)
Re: lc_collate mess

On 22/11/2020 15:31, Susanne & Udo Krause wrote:

the new PostgreSQL has been created from scratch by standard
installation with German_Switzerland, then it does not know:

------------------------------------------------------------------------

C:\Users\postgres\Documents>pg_upgrade.exe --old-datadir "C:/Program
Files/PostgreSQL/12/data" --new-datadir "C:/Program
Files/PostgreSQL/13/data" --old-bindir "C:/Program
Files/PostgreSQL/12/bin" --new-bindir "C:/Program
Files/PostgreSQL/13/bin" --check
Führe Konsistenzprüfungen durch
-------------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok

lc_collate-Werte für Datenbank »postgres« stimmen nicht überein: alt
»German_Switzerland.1252«, neu »German_Germany.1252«
Fehlgeschlagen, Programm wird beendet

C:\Users\postgres\Documents>

------------------------------------------------------------------------

where is a hint how to fix that? New PostgreSQL did not yet start up, of
course.

The error message suggests that the old database was initialized with
"German_Switzerland.1252" locale, and the new one with
"German_Germany.1252". The new database needs to initialized with the
same locale as the old one for pg_upgrade to work. Make sure you select
""German_Switzerland.1252" in the PostgreSQL 13 installer.

Or you can re-initialize the datadir after installing PostgreSQL with
something like:

initdb -D "C:/Program Files/PostgreSQL/13/data"
--locale="German_Switzerland.1252"

- Heikki