Re: Issue in pg_update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yuriy Tereshchuk <YTereshchuk(at)lohika(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Issue in pg_update
Date: 2016-10-16 17:50:55
Message-ID: 19298.1476640255@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Yuriy Tereshchuk <YTereshchuk(at)lohika(dot)com> writes:
> $ /usr/local/bin/pg_upgrade -b /home/astro/Postgresql9.1.4/bin -B /usr/local/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_authid.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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2016-10-17 09:20:24 Re: BUG #14344: string_agg(DISTINCT ..) crash
Previous Message Yuriy Tereshchuk 2016-10-16 00:15:38 Issue in pg_update