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 1ldy98-0004i9-V7 for pgsql-general@arkaria.postgresql.org; Tue, 04 May 2021 16:43:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ldy97-0004zO-Kh for pgsql-general@arkaria.postgresql.org; Tue, 04 May 2021 16:43:41 +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 1ldy97-0004zG-DC for pgsql-general@lists.postgresql.org; Tue, 04 May 2021 16:43:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldy95-0004hJ-6D for pgsql-general@lists.postgresql.org; Tue, 04 May 2021 16:43:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 144GhaTh3911280; Tue, 4 May 2021 12:43:36 -0400 From: Tom Lane To: Arne Henrik Segtnan cc: pgsql-general@lists.postgresql.org Subject: Re: PostgreSQL upgrade from 10 to 12 fails with "ERROR: column r.relhasoids does not exist at character 1616" In-reply-to: <701D76CE-2EF0-4955-AC16-36E86B85E4F6@basis-consulting.com> References: <701D76CE-2EF0-4955-AC16-36E86B85E4F6@basis-consulting.com> Comments: In-reply-to Arne Henrik Segtnan message dated "Tue, 04 May 2021 18:29:17 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3911278.1620146616.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 04 May 2021 12:43:36 -0400 Message-ID: <3911279.1620146616@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Arne Henrik Segtnan writes: > When trying to upgrade from PostgreSQL 10 to 12, the installation fails = as shown below. = > 2021-05-04 13:06:05.614 CEST [12890] postgres@zabbix_db ERROR: column r= .relhasoids does not exist at character 1616 > 2021-05-04 13:06:05.614 CEST [12890] postgres@zabbix_db STATEMENT: > -- For binary upgrade, must preserve pg_type oid > SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('162222'::pg_cata= log.oid); > -- For binary upgrade, must preserve pg_type array oid > SELECT pg_catalog.binary_upgrade_set_next_array_pg_type_oid('162221'::p= g_catalog.oid); > -- For binary upgrade, must preserve pg_class oids > SELECT pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('162220'::p= g_catalog.oid); > CREATE VIEW "repack"."tables" AS > SELECT ("r"."oid")::"regclass" AS "relname", > "r"."oid" AS "relid", > "r"."reltoastrelid", > CASE > . > . > . You didn't show us the rest of the command, but it looks like this view contains a reference to pg_class.relhasoids. As Bruce noted, that column no longer exists, so you're not going to be able to transparently upgrade this view. I don't know what this view is from, though the schema name "repack" is suggestive. Possibly you could drop whatever it's a part of, and then reinstall an updated version after upgrading? regards, tom lane