Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5tKA-0002O6-7x for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 14:33:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5tK8-0001Jd-Tw for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 14:33:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5tK8-0001IV-KX for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 14:33:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5tK5-0007I6-ST for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 14:33:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2IEX1Mx002268; Mon, 18 Mar 2019 10:33:01 -0400 From: Tom Lane To: Tomasz Szypowski cc: pgsql-bugs@lists.postgresql.org Subject: Re: pg_upgrade In-reply-to: References: Comments: In-reply-to Tomasz Szypowski message dated "Mon, 18 Mar 2019 06:01:54 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2266.1552919581.1@sss.pgh.pa.us> Date: Mon, 18 Mar 2019 10:33:01 -0400 Message-ID: <2267.1552919581@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomasz Szypowski writes: > while using pg_upgrade I receive an error: > pg_restore: dropping DATABASE template1 > pg_restore: [archiver (db)] Error while PROCESSING TOC: > pg_restore: [archiver (db)] Error from TOC entry 1955; 1262 1 DATABASE > template1 postgres > pg_restore: [archiver (db)] could not execute query: ERROR: cannot drop a > template database > Command was: DROP DATABASE "template1"; Hmmm ... I could believe this would happen if you've removed the is_template marking from template1 in the source installation. That doesn't seem like a terribly good idea though, so I'm not inclined to try to figure a way for pg_dump to work around it. regards, tom lane