Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSgEm-0003hG-0Q for pgsql-admin@arkaria.postgresql.org; Sat, 23 Dec 2017 09:37:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSgEk-0004FW-84 for pgsql-admin@arkaria.postgresql.org; Sat, 23 Dec 2017 09:36:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eSgEk-0004EB-1G for pgsql-admin@lists.postgresql.org; Sat, 23 Dec 2017 09:36:58 +0000 Received: from mail6.webfaction.com ([31.170.123.134] helo=smtp.webfaction.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eSgEg-0005g4-B6 for pgsql-admin@lists.postgresql.org; Sat, 23 Dec 2017 09:36:56 +0000 Received: from [192.168.16.50] (unknown [120.149.211.232]) by smtp.webfaction.com (Postfix) with ESMTPSA id B0CA0612C5A94 for ; Sat, 23 Dec 2017 09:36:49 +0000 (UTC) Reply-To: rhills@medimorphosis.com.au To: pgsql-admin@lists.postgresql.org From: Rob Hills Subject: pg_upgradecluster 9.5 -> 9.6 fails "Error: could not get cluster locales" on Ubuntu 17.04 Message-ID: <1c03aa8c-529e-ecaf-550c-ee8a0db28073@medimorphosis.com.au> Date: Sat, 23 Dec 2017 17:36:45 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------6675F305580705C78DDF1047" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------6675F305580705C78DDF1047 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Today I upgraded from Ubuntu 16.04 LTS to 17.04 which forced a Postgresql upgrade from 9.5.10 to 9.6.6. I followed the instructions specified during the Ubuntu upgrade: sudo pg_dropcluster --stop 9.6 main sudo pg_upgradecluster 9.5 main The pg_dropcluster completed without any issues. pg_upgradecluster failed with the following: rob@robs-zenbook-3:~$ sudo pg_upgradecluster 9.5 main Disabling connections to the old cluster during upgrade... Restarting old cluster with restricted connections... Redirecting start request to systemctl psql: FATAL:  the database system is starting up psql: FATAL:  the database system is starting up Use of uninitialized value $out in pattern match (m//) at /usr/share/perl5/PgCommon.pm line 944. psql: FATAL:  the database system is starting up Use of uninitialized value $out in pattern match (m//) at /usr/share/perl5/PgCommon.pm line 950. Use of uninitialized value $ctype in scalar chomp at /usr/share/perl5/PgCommon.pm line 953. Use of uninitialized value $collate in scalar chomp at /usr/share/perl5/PgCommon.pm line 954. Error: could not get cluster locales In case it makes a difference, here's the output from my "locale" command: rob@robs-zenbook-3:~$ locale LANG=en_AU.UTF-8 LANGUAGE=en_AU:en LC_CTYPE="en_AU.UTF-8" LC_NUMERIC="en_AU.UTF-8" LC_TIME="en_AU.UTF-8" LC_COLLATE="en_AU.UTF-8" LC_MONETARY="en_AU.UTF-8" LC_MESSAGES="en_AU.UTF-8" LC_PAPER="en_AU.UTF-8" LC_NAME="en_AU.UTF-8" LC_ADDRESS="en_AU.UTF-8" LC_TELEPHONE="en_AU.UTF-8" LC_MEASUREMENT="en_AU.UTF-8" LC_IDENTIFICATION="en_AU.UTF-8" LC_ALL= I tried specifying a locale in the pg_upgradecluster command but got the same error as previously: sudo pg_upgradecluster --locale=en_AU.UTF-8 9.5 main I've found some threads discussing this specific issue, but none of them really identify the cause or provide any workaround. Is there anything else I can do to try and work out what's causing the problem and get my cluster upgraded? TIA, -- Rob Hills Waikiki, Western Australia --------------6675F305580705C78DDF1047 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi,

Today I upgraded from Ubuntu 16.04 LTS to 17.04 which forced a Postgresql upgrade from 9.5.10 to 9.6.6.

I followed the instructions specified during the Ubuntu upgrade:

sudo pg_dropcluster --stop 9.6 main
sudo pg_upgradecluster 9.5 main

The pg_dropcluster completed without any issues.  pg_upgradecluster failed with the following:

rob@robs-zenbook-3:~$ sudo pg_upgradecluster 9.5 main
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
Redirecting start request to systemctl
psql: FATAL:  the database system is starting up
psql: FATAL:  the database system is starting up
Use of uninitialized value $out in pattern match (m//) at /usr/share/perl5/PgCommon.pm line 944.
psql: FATAL:  the database system is starting up
Use of uninitialized value $out in pattern match (m//) at /usr/share/perl5/PgCommon.pm line 950.
Use of uninitialized value $ctype in scalar chomp at /usr/share/perl5/PgCommon.pm line 953.
Use of uninitialized value $collate in scalar chomp at /usr/share/perl5/PgCommon.pm line 954.
Error: could not get cluster locales

In case it makes a difference, here's the output from my "locale" command:

rob@robs-zenbook-3:~$ locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=

I tried specifying a locale in the pg_upgradecluster command but got the same error as previously:

sudo pg_upgradecluster --locale=en_AU.UTF-8 9.5 main

I've found some threads discussing this specific issue, but none of them really identify the cause or provide any workaround.

Is there anything else I can do to try and work out what's causing the problem and get my cluster upgraded?

TIA,

--
Rob Hills
Waikiki, Western Australia
--------------6675F305580705C78DDF1047--