Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUCi9-0002O0-OK for pgsql-admin@arkaria.postgresql.org; Thu, 19 Jan 2017 13:25:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cUCi9-0007te-BM for pgsql-admin@arkaria.postgresql.org; Thu, 19 Jan 2017 13:25:05 +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 1cUCi8-0007oi-73 for pgsql-admin@postgresql.org; Thu, 19 Jan 2017 13:25:04 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cUCi5-0003tW-2y for pgsql-admin@postgresql.org; Thu, 19 Jan 2017 13:25:03 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 69A1C1E1958; Thu, 19 Jan 2017 14:24:59 +0100 (CET) Received: from msg.credativ.de (fw-front.credativ.com [62.154.226.94]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cbe@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 506491E18D6; Thu, 19 Jan 2017 14:24:59 +0100 (CET) Date: Thu, 19 Jan 2017 14:24:59 +0100 From: Christoph Berg To: Matthieu Lejeune Cc: "pgsql-admin@postgresql.org" Subject: Re: Pg_upgradecluster failed Message-ID: <20170119132458.3e6im2vhfypajfhd@msg.credativ.de> Mail-Followup-To: Christoph Berg , Matthieu Lejeune , "pgsql-admin@postgresql.org" References: <45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com> User-Agent: NeoMutt/20161126 (1.7.1) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Re: Matthieu Lejeune 2017-01-18 <45d1244b-145d-ffce-d140-0f693ae4948f@exxoss.com> > 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 Hi, pg_upgradecluster relies on the template1 database being accessible for maintenance operations during the upgrade. This is currently not configurable, but we could certainly add an option to allow passing a different database (e.g. "postgres") for the upgrade. > postgres=# select * from pg_database > ; > datname | datdba | encoding | datcollate | datctype | datistemplate | > datallowconn | datconnlimit | datlastsysoid | datfrozenxid | datminmxid | > dattablespace | datacl > ------------+--------+----------+------------+----------+---------------+--------------+--------------+---------------+--------------+------------+---------------+------------------------------------- > template0 | 10 | 0 | C | C | t | t > | -1 | 12030 | 200000724 | 37376355 | 1663 | > {=c/postgres,postgres=CTc/postgres} Uhm, "template0" must never be connected to, you shouldn't have set datallowconn = 't. for it. > If I try to change from false to true I got this error : > template0 must not allow connections, i.e. its pg_database.datallowconn must (It seems this was even wrong before you changed it now) Mit freundlichen Grüßen, Christoph Berg -- Senior Berater, Tel.: +49 2166 9901 187 credativ GmbH, HRB Mönchengladbach 12080, USt-ID-Nummer: DE204566209 Trompeterallee 108, 41189 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer pgp fingerprint: 5C48 FE61 57F4 9179 5970 87C6 4C5A 6BAB 12D2 A7AE -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin