I am really new to Postgres so sorry if it an easy/stupid question.
I switched from Postgres 10 to 15 by doing the following:
- Installed PostgreSQL 15
- Stoped the 15 cluster and drop it
- Upgraded 10 cluster to the latest version
- Dropped 10 cluster
- Restarted PostgreSQL
- Uninstall PostgreSQL 10
Now I actually found that I needed to have another locale configured on my server and it needed to be done before installation.
How would it be correct to change the locale? Should I unistall Postgress at all or:
- Reinstall 10 first
- Delete 15
- Change the locale
- install 15 as I did before
Or is it necessary to change the locale before installation at all?
Edit: When I was upgrading ver 10, I got an error:
sudo pg_upgradecluster 10 main
Stopping old cluster...
Restarting old cluster with restricted connections...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Error: The locale requested by the environment is invalid:
LANG: en_US.UTF-8
LC_CTYPE: UTF-8
Error: Could not create target cluster
I have been told that this locale is wrong for my server and it should be changed before installation of Postgres.