3

I am upgrading PostgreSQL 8.4 to 9.5 on Windows. Following are the steps that are to be followed:

  1. Install PostgreSQL 9.5 (8.4 is already installed).
  2. Migrate data from 8.4's data dir to 9.5's data dir using pg_upgrade utility.
  3. After successful upgrade, uninstall PostgreSQL 8.4

Here the issue is that PostgreSQL 8.4 could be installed with any locale (English or French etc.) and to have successful data directory upgrade, PostgreSQL 9.5 must be installed with the same locale as that of 8.4.

Supplying the output of query 'Show lc_collate' (executed on PostgreSQL 8.4) to PostgreSQL 9.5 installation leads to failed installation. It generates the error 'specified locale is not supported'.

Here is the example:

Output (PostgreSQL 8.4) of query 'SHOW LC_COLLATE': English_United States.1252

A. --locale "English_United States.1252"

While installing PostgreSQL 9.5, If we pass locale option as above, installer aborts with an error 'specified locale is not supported'.

B. --locale "English, United States"

If we pass locale option as above, installation is successful and cluster locale is set to 'English, United States'.

Given that one has access to PostgreSQL 8.4, how would one know what value to pass to the parameter --locale while installing PostgreSQL 9.5?


UPDATE:

If PostgreSQL 8.4 is installed with following --locale values

  1. --locale "English_United States.1252"

    Installation fails, gives same error: 'Locale specified is not supported.'

  2. --locale "English, United States"

    Successful Installation, value of 'Show lc_collate': English, United States

  3. No Value (i.e. parameter --locale is not provided during installation)

    Successful Installation, value of 'Show lc_collate': English_United States.1252

If you notice point 1. and 3., locale value is stored as English_United States.1252 but can not be given as a value of parameter during installation. This seems to me as a bug.

Please let me know how to tackle this issue ?

In my case, --locale parameter was not provided during PostgreSQL 8.4 installation [scenario 3].

Community
  • 1
  • 1
user
  • 383
  • 1
  • 5
  • 20
  • Sounds like a bug or a usability problem close enough to a bug. Please raise it on the pgsql-bugs mailing list. – Craig Ringer Jul 05 '17 at 01:39
  • Posted it on pgsql-bugs mailing list. Link:  https://www.postgresql.org/message-id/20170705051940.9036.1206@wrigleys.postgresql.org – user Jul 05 '17 at 08:02
  • @CraigRinger How often does one get the reply on PostgreSQL forum (pgsql-bugs mailing list) ? I am eagerly waiting for the solution/workaround to the above mentioned problem. – user Jul 06 '17 at 06:13
  • Varies. More quickly if it's a clear post with well defined test case. Less quickly for Windows, usually, I'm afraid. I sometimes try to speak up there but I can't help much at the moment due to work pressure from internal projects. If it's urgent you can contact https://www.postgresql.org/support/professional_support/ but of course that's all paid consulting services. – Craig Ringer Jul 06 '17 at 06:57
  • You may get quicker help on pgsql-general too. – Craig Ringer Jul 06 '17 at 07:03
  • Thank you for the information. I mailed the issue at pgsql-general also, but didn't get any response. :) – user Jul 06 '17 at 07:31

0 Answers0