pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Modica <davidmo@imaginesoftware.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: binary upgade errors
Date: Thu, 14 Jun 2018 16:24:28 -0400
Message-ID: <10537.1529007868@sss.pgh.pa.us> (raw)
In-Reply-To: <7cb957dd12774a52ac8a680b73910c5b@imaginesoftware.com>
References: <7cb957dd12774a52ac8a680b73910c5b@imaginesoftware.com>

David Modica <davidmo@imaginesoftware.com> writes:
> 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 include the error msg.

> 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 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"."uint1";

Hmm ... it looks like this domain is depending on there to be a cast from
integer to uint1, but that hasn't been created yet.  There may be a bug
here; I'm not sure why pg_dump didn't delay dumping the domain to after
it'd dumped the cast.  In the meantime, though, it seems like it would
work (and probably be faster anyway) if you spelled the default value
like '0'::uint1 rather than 0::uint1, as the former isn't depending on
any run-time cast.  So try altering the domain like that and then doing
the upgrade.

			regards, tom lane




view thread (5+ messages)  latest in thread

Message-ID: <10537.1529007868@sss.pgh.pa.us>
Permalink:  ../10537.1529007868@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10537.1529007868@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, davidmo@imaginesoftware.com, pgsql-admin@lists.postgresql.org
  Subject: Re: binary upgade errors
  In-Reply-To: <10537.1529007868@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox