Re: Issue in pg_update - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Issue in pg_update
Date
Msg-id 19298.1476640255@sss.pgh.pa.us
Whole thread Raw
In response to Issue in pg_update  (Yuriy Tereshchuk <YTereshchuk@lohika.com>)
List pgsql-bugs
Yuriy Tereshchuk <YTereshchuk@lohika.com> writes:
> $ /usr/local/bin/pg_upgrade -b /home/astro/Postgresql9.1.4/bin -B /usr/l=
ocal/bin -d /usr/local/pgsql/data.old -D /usr/local/pgsql/data96
> ...
> pg_restore: creating VIEW "public.pg_prepared_statements"
> pg_restore: creating VIEW "public.pg_prepared_xacts"
> pg_restore: creating VIEW "public.pg_roles"
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 162; 1259 17237 VIEW pg=
_roles astro
> pg_restore: [archiver (db)] could not execute query: ERROR:  column pg_a=
uthid.rolcatupdate does not exist
> LINE 14: ...thid"."rolcreaterole", "pg_authid"."rolcreatedb", "pg_authid=
...
>                                                               ^

Your 9.1 installation seems to have copies in the public schema of a bunch
of system views --- we can see three of them in this log excerpt, and I'm
betting there are more.  There is no mechanism that would automatically
update those copies to be correct for the new database version, and this
failure is occurring precisely because the 9.1 version of pg_roles is
incorrect for 9.6.  I'd suggest dropping all of those views in the source
installation --- why would you need them, anyway?  The originals in
pg_catalog should suffice.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Yuriy Tereshchuk
Date:
Subject: Issue in pg_update
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #14344: string_agg(DISTINCT ..) crash