1

I'm trying to upgrade postgres cluster from 9.5 to 10

Steps I did:

  • installed postgresql-10 and postgresql-client-10
  • removed new default 10 main cluster
  • used command "pg_upgradecluster 9.5 main" which resulted in "Error: could not get cluster locales"

my 9.5 locale settings are:

postgres=# SHOW LC_CTYPE;
  lc_ctype  
------------
 et_EE.UTF8
(1 row)

postgres=# SHOW LC_COLLATE;
 lc_collate 
------------
 et_EE.UTF8
(1 row)

system locales:

root@server:~# locale -a
C
C.UTF-8
en_US.utf8
et_EE.utf8
POSIX

root@server:~# locale
LANG=et_EE.UTF-8
LANGUAGE=et_EE.UTF-8
LC_CTYPE="et_EE.UTF-8"
LC_NUMERIC="et_EE.UTF-8"
LC_TIME="et_EE.UTF-8"
LC_COLLATE="et_EE.UTF-8"
LC_MONETARY="et_EE.UTF-8"
LC_MESSAGES="et_EE.UTF-8"
LC_PAPER="et_EE.UTF-8"
LC_NAME="et_EE.UTF-8"
LC_ADDRESS="et_EE.UTF-8"
LC_TELEPHONE="et_EE.UTF-8"
LC_MEASUREMENT="et_EE.UTF-8"
LC_IDENTIFICATION="et_EE.UTF-8"
LC_ALL=et_EE.UTF-8

postgres.conf:

# These settings are initialized by initdb, but they can be changed.
lc_messages = 'et_EE.UTF8'                      # locale for system error message
                                        # strings
lc_monetary = 'et_EE.UTF8'                      # locale for monetary formatting
lc_numeric = 'et_EE.UTF8'                       # locale for number formatting
lc_time = 'et_EE.UTF8'                          # locale for time formatting

Has anyone else run into trouble with pg_upgradecluster?

1 Answers1

0

There is a Postgresql thread here that suggests running the pg_upgradecluster command as root could help because:

[...] sometimes, in Ubuntu systems, if ssh login user's locale is different, it ["Error: could not get cluster locales"] may happen.

I don't know if you are on a Ubuntu system, but maybe you could give it a try?