pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthieu Lejeune <matthieu.lejeune@exxoss.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Pg_upgradecluster failed
Date: Wed, 18 Jan 2017 16:23:49 +0100
Message-ID: <45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi all,

I try to upgrade from 9.3 to 9.5

ii  postgresql-9.3               9.3.14-1.pgdg70+1 amd64               
object-relational SQL database, version 9.3 server
ii  postgresql-9.5               9.5.5-1.pgdg70+1 amd64               
object-relational SQL database, version 9.5 server

But with my command I got this error :

oot@bas40:/etc/postgresql/9.3/main# pg_upgradecluster -v 9.5 -m upgrade 
9.3 main
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
psql: FATAL:  database "template1" is not currently accepting connections
psql: FATAL:  database "template1" is not currently accepting connections
Use of uninitialized value $out in pattern match (m//) at 
/usr/share/perl5/PgCommon.pm line 925.
psql: FATAL:  database "template1" is not currently accepting connections
Use of uninitialized value $out in pattern match (m//) at 
/usr/share/perl5/PgCommon.pm line 931.
Use of uninitialized value $ctype in scalar chomp at 
/usr/share/perl5/PgCommon.pm line 934.
Use of uninitialized value $collate in scalar chomp at 
/usr/share/perl5/PgCommon.pm line 935.
Error: could not get cluster locales

I get this error on some of my pgsql servers and it's work on other one.
If I check the dataallowconn on my server :


postgres=# select * from pg_database
;
   datname   | datdba | encoding | datcollate | datctype | datistemplate 
| datallowconn | datconnlimit | datlastsysoid | datfrozenxid | 
datminmxid | dattablespace |               datacl
------------+--------+----------+------------+----------+---------------+--------------+--------------+---------------+--------------+------------+---------------+-------------------------------------
  postgres   |     10 |        0 | C          | C        | f             
| t            |           -1 |         12030 | 150000757 |   32376355 
|          1663 |
  energycomm |  16384 |        6 | C          | C        | f             
| t            |           -1 |         12030 | 101905564 |   28843537 
|          1663 |
  template0  |     10 |        0 | C          | C        | t             
| t            |           -1 |         12030 | 200000724 |   37376355 
|          1663 | {=c/postgres,postgres=CTc/postgres}
  template1  |     10 |        6 | C          | C        | t             
| f            |           -1 |         12030 | 200000758 |   37376355 
|          1663 |
(4 lignes)

postgres=#

If I try to change from false to true I got this error  :

root@bas40:/etc/postgresql/9.3/main# pg_upgradecluster -v 9.5 -m upgrade 
9.3 main
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
Stopping old cluster...
Creating new cluster 9.5/main ...
   config /etc/postgresql/9.5/main
   data   /var/lib/postgresql/9.5/main
   locale fr_BE.UTF-8
   socket /var/run/postgresql
   port   5433
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings
template0 must not allow connections, i.e. its pg_database.datallowconn 
must be false
Failure, exiting
Error: pg_upgrade run failed. Logfiles are in 
/var/log/postgresql/pg_upgradecluster-9.3-9.5-main.rFyo
Re-enabling connections to the old cluster...
Error during cluster dumping, removing new cluster
pg_ctl : le fichier de PID « /var/lib/postgresql/9.3/main/postmaster.pid 
» n'existe pas
Le serveur est-il en cours d'exécution ?
Error: could not reload old cluster, please do that manually
root@bas40:/etc/postgresql/9.3/main#

Someone have this issue and know how to solved it ?

Kind regards

Matthieu Lejeune


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (2+ messages)  latest in thread

Message-ID: <45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com>
Permalink:  ../45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com/
Also on:    postgresql.org/message-id/45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: matthieu.lejeune@exxoss.com
  Subject: Re: Pg_upgradecluster failed
  In-Reply-To: <45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox