Localization issue when upgrading data directory from PostgreSQL 8.4 to 9.5
I am upgrading PostgreSQL 8.4 to 9.5 on Windows. Below are the steps to follow:
- Installing PostgreSQL 9.5 (8.4 is already installed).
- Transfer data from 8.4 data dir to 9.5 data dir using the pg_upgrade utility.
- After successful upgrade uninstall PostgreSQL 8.4
The problem here is that PostgreSQL 8.4 can be installed with any locale (English or French, etc.) and have a successful data directory update, PostgreSQL 9.5 must be installed with the same locale as 8.4.
Delivering the "Show lc_collate" query output (executed on PostgreSQL 8.4) to a PostgreSQL 9.5 installation results in a failed installation. It generates a "The specified language is not supported" error.
Here's an example:
Output (PostgreSQL 8.4) of the "SHOW LC_COLLATE" query: English_United States.1252
and. --locale "English_United States.1252"
When installing PostgreSQL 9.5, if we pass the locale option as above, setting the interrupt with the error "the specified language is not supported".
V. --locale "English, USA"
If we pass the locale option as above, the installation is successful and the cluster locale is set to "US English".
Given that the user has access to PostgreSQL 8.4, how do I know what value to pass in the -locale parameter when installing PostgreSQL 9.5?
UPDATE:
If PostgreSQL 8.4 is installed with the following values ββ--locale
-
- locale "English_United States.1252"
Installation error, gives the same error: "The specified language is not supported."
-
- locale "English, United States"
Successful installation, value 'Show lc_collate': English, US
-
No value (that is, the -locale option is not provided during installation)
Successful installation, value "Show lc_collate": English_United States.1252
If you notice points 1 and 3., the locale value is stored as English_United States.1252, but cannot be set as a parameter value during installation. This seems like a mistake to me.
Please let me know how to solve this problem?
In my case, the -locale parameter was not specified during the PostgreSQL 8.4 installation [scenario 3].
source to share
No one has answered this question yet
See similar questions:
or similar: