I have some old database that I need to connect to (postgres 9.1). I have no problem to start server with
pg_ctl start -D D:\datadir\pgdata\data -w
but when I try to connect, it gives:
psql -U postgres -p 15432
psql: FATAL: database locale is incompatible with operating system
DETAIL: The database was initialized with LC_COLLATE "Norwegian (Bokmål)_Norway.1252", which is not recognized by setlocale().
HINT: Recreate the database with another locale or install the missing locale.
new version of postgres would not start server (incompatible data version). I'm using windows 10, with postgres 9.1 binaries.
How would it be possible to connect, migrate, upgrade such database, to access it data?
I had this issue today. Except my error was for en_GB:
The database was initialized with LC_COLLATE "en_GB.UTF-8", which is not recognized by setlocale().
I solved it with
localedef -f UTF-8 -i en_GB en_GB.UTF-8
You will need to change it depending on your language setting.
Restart the postgresql service after.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With