Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO0kS-0004so-Rx for pgsql-general@arkaria.postgresql.org; Thu, 01 Oct 2020 15:44:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kO0kR-00062R-Pg for pgsql-general@arkaria.postgresql.org; Thu, 01 Oct 2020 15:43:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO0kR-00062I-IM for pgsql-general@lists.postgresql.org; Thu, 01 Oct 2020 15:43:59 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO0kM-0002NG-Q1 for pgsql-general@lists.postgresql.org; Thu, 01 Oct 2020 15:43:57 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kO0kK-0006BD-Bu; Thu, 01 Oct 2020 11:43:52 -0400 Date: Thu, 1 Oct 2020 11:43:52 -0400 From: Bruce Momjian To: Thomas Kellerer Cc: pgsql-general@lists.postgresql.org Subject: Re: pg_upgrade issue upgrading 10 -> 13 Message-ID: <20201001154352.GA15909@momjian.us> References: <918798A5-7ADF-4252-A2BF-E5639F45EC15@saminds.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Oct 1, 2020 at 05:28:53PM +0200, Thomas Kellerer wrote: > > > Sean Brown schrieb am 01.10.2020 um 16:51: > > I’m having a little problem using pg_upgrade to move from 10 to 13, > > I’m assuming the issue is related to the removal of pg_pltemplate, > > but I can’t find anything related to how to handle it. > > > > pg_upgrade —check reports that the clusters are compatible, but the > > actual upgrade fails starting the new cluster with - > > > > ERROR: relation “pg_catalog.pg_pltemplate” does not exist STATEMENT: > > GRANT SELECT ON TABLE “pg_catalog"."pg_pltemplate” TO "appuser”; > > > > Is there a way to deal with this that doesn’t include dropping the > > source table? > > > > Does revoking the privilege before running pg_upgrade help? > > So in the v10 database: > > revoke select on pg_catalog.pg_pltemplate from appuser; Yeah, there must be a reference to pg_catalog.pg_pltemplate somewhere that was missed. I think a simple dump/restore would also error on the restore, but a normal restore might ignore the error, while pg_upgrade will not. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee