Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTXLV-0005aa-8B for pgsql-admin@arkaria.postgresql.org; Thu, 14 Jun 2018 18:51:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fTXLT-0002Fx-SJ for pgsql-admin@arkaria.postgresql.org; Thu, 14 Jun 2018 18:51:43 +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.89) (envelope-from ) id 1fTUXC-0007Cw-1s for pgsql-admin@lists.postgresql.org; Thu, 14 Jun 2018 15:51:38 +0000 Received: from smtp90.ord1c.emailsrvr.com ([108.166.43.90]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTUX7-0001E4-KS for pgsql-admin@lists.postgresql.org; Thu, 14 Jun 2018 15:51:37 +0000 Received: from smtp4.relay.ord1c.emailsrvr.com (localhost [127.0.0.1]) by smtp4.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id D720FA043E for ; Thu, 14 Jun 2018 11:51:21 -0400 (EDT) X-SMTPDoctor-Processed: csmtpprox beta Received: from smtp4.relay.ord1c.emailsrvr.com (localhost [127.0.0.1]) by smtp4.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id D46B4A0371 for ; Thu, 14 Jun 2018 11:51:21 -0400 (EDT) Received: from smtp192.mex09.emailsrvr.com (unknown [184.106.73.70]) by smtp4.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTPS id A4673A0450 for ; Thu, 14 Jun 2018 11:51:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=imaginesoftware.com; s=20170104; t=1528991481; bh=zBB2DFKkcaIIf4qTyN5J5jlRiSuWbCEw0QCOBzQyzQ8=; h=From:To:Subject:Date:From; b=g/bJwqZLIIKMMjvbufBgYJ7wlg/zsBbUdlugS636gHafCxeM3Dvr9HSnwoSCAsTpI C7OTmgA3tQxy77TowjjZ6/JFXhv/RUdEO4dJnEFtVPq6MSHcu/NWuZsOxoSpwMHkZ/ Na9S20gYPQK6XML9fVSRCPkVHyGONp87y0G5Pt70= X-Sender-Id: davidmo@imaginesoftware.com Received: from smtp192.mex09.emailsrvr.com ([UNAVAILABLE]. [184.106.73.70]) (using TLSv1.2 with cipher AES256-GCM-SHA384) by 0.0.0.0:25 (trex/5.7.12); Thu, 14 Jun 2018 11:51:21 -0400 Received: from MBX01D-ORD1.mex09.mlsrvr.com (172.29.128.27) by MBX01D-ORD1.mex09.mlsrvr.com (172.29.128.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 14 Jun 2018 10:51:20 -0500 Received: from MBX01D-ORD1.mex09.mlsrvr.com ([fe80::c9b1:8c28:1031:4efd]) by MBX01D-ORD1.mex09.mlsrvr.com ([fe80::c9b1:8c28:1031:4efd%21]) with mapi id 15.01.1466.003; Thu, 14 Jun 2018 10:51:20 -0500 From: David Modica To: "pgsql-admin@lists.postgresql.org" Subject: binary upgade errors Thread-Topic: binary upgade errors Thread-Index: AdQD9uZFYcc2bULDSy+FhZmBASKrMg== Date: Thu, 14 Jun 2018 15:51:20 +0000 Message-ID: <7cb957dd12774a52ac8a680b73910c5b@imaginesoftware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [4.31.46.200] Content-Type: multipart/alternative; boundary="_000_7cb957dd12774a52ac8a680b73910c5bimaginesoftwarecom_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_7cb957dd12774a52ac8a680b73910c5bimaginesoftwarecom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable hi all. first time posting here. I have been unsuccessfully trying to use pg_upgrade to upgrade from 9.6 to = 10.4. we have the uint extension in some of the databases. a combination of that = extension and probably how we have used it is causing the upgrade to fail. I will inc= lude the error msg. can anyone with some experience please point me in the right direction to f= ix it ? thanks, david output from pg_upgrade: command: "/usr/pgsql-10.4/bin/pg_restore" --host /var/lib/pgsql/10.4 --port= 50432 --username postgres --exit-on-error --verbose --dbname 'dbname=3Ddev= el8' "pg_upgrade_dump_271840.custom" >> "pg_upgrade_dump_271840.log" 2>&1 pg_restore: connecting to database for restore pg_restore: creating pg_largeobject "pg_largeobject" pg_restore: creating pg_largeobject_metadata "pg_largeobject_metadata" pg_restore: creating SCHEMA "its" pg_restore: creating SCHEMA "public" pg_restore: creating COMMENT "SCHEMA "public"" pg_restore: creating EXTENSION "uint" pg_restore: creating COMMENT "EXTENSION "uint"" pg_restore: creating DOMAIN "its.adj_id_t" pg_restore: creating DOMAIN "its.any_id_t" pg_restore: creating DOMAIN "its.bigint_id_t" pg_restore: creating SHELL TYPE "public.uint1" pg_restore: creating FUNCTION "public.uint1in("cstring")" pg_restore: creating FUNCTION "public.uint1out("public"."uint1")" pg_restore: creating TYPE "public.uint1" pg_restore: creating FUNCTION "public.uint1(integer)" pg_restore: creating DOMAIN "its.bool_t" pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 4538; 1247 280489 DOMAIN b= ool_t postgres pg_restore: [archiver (db)] could not execute query: ERROR: cannot cast ty= pe integer to public.uint1 Command was: -- For binary upgrade, must preserve pg_type oid SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('280489'::pg_catalog.= oid); CREATE DOMAIN "its"."bool_t" AS "public"."uint1" DEFAULT (0)::"public"."uin= t1"; --_000_7cb957dd12774a52ac8a680b73910c5bimaginesoftwarecom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

hi all. first time posting here.

 

I have been unsuccessfully trying to use pg_upgrade = to upgrade from 9.6 to 10.4.

 

we have the uint extension in some of the databases.= a combination of that extension

 

and probably how we have used it is causing the upgr= ade to fail. I will include the error msg.

 

can anyone with some experience please point me in t= he right direction to fix it ?

 

thanks, 

 

david

 

output from pg_upgrade:

command: "/usr/pg= sql-10.4/bin/pg_restore" --host /var/lib/pgsql/10.4 --port 50432 --use= rname postgres --exit-on-error --verbose --dbname 'dbname=3Ddevel8' "p= g_upgrade_dump_271840.custom" >> "pg_upgrade_dump_271840.lo= g" 2>&1

pg_restore: connecting= to database for restore

pg_restore: creating p= g_largeobject "pg_largeobject"

pg_restore: creating p= g_largeobject_metadata "pg_largeobject_metadata"

pg_restore: creating S= CHEMA "its"

pg_restore: creating S= CHEMA "public"

pg_restore: creating C= OMMENT "SCHEMA "public""

pg_restore: creating E= XTENSION "uint"

pg_restore: creating C= OMMENT "EXTENSION "uint""

pg_restore: creating D= OMAIN "its.adj_id_t"

pg_restore: creating D= OMAIN "its.any_id_t"

pg_restore: creating D= OMAIN "its.bigint_id_t"

pg_restore: creating S= HELL TYPE "public.uint1"

pg_restore: creating F= UNCTION "public.uint1in("cstring")"

pg_restore: creating F= UNCTION "public.uint1out("public"."uint1")"

pg_restore: creating T= YPE "public.uint1"

pg_restore: creating F= UNCTION "public.uint1(integer)"

pg_restore: creating D= OMAIN "its.bool_t"

pg_restore: [archiver = (db)] Error while PROCESSING TOC:

pg_restore: [archiver = (db)] Error from TOC entry 4538; 1247 280489 DOMAIN bool_t postgres

pg_restore: [archiver = (db)] could not execute query: ERROR:  cannot cast type integer to pub= lic.uint1

    Com= mand was:

-- For binary upgrade,= must preserve pg_type oid

SELECT pg_catalog.bina= ry_upgrade_set_next_pg_type_oid('280489'::pg_catalog.oid);

 

CREATE DOMAIN "it= s"."bool_t" AS "public"."uint1" DEFAULT = (0)::"public"."uint1";

 

 

--_000_7cb957dd12774a52ac8a680b73910c5bimaginesoftwarecom_--