Search Postgresql Archives

Re: Failed upgrade from 12.11 to 14.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was unaware this was a user created view.  Dropping the view did the trick thanks for the help.

On Wed, Mar 1, 2023 at 1:54 PM Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Arthur Ramsey <arthur.ramsey@xxxxxxxxxx> writes:
> "Database instance is in a state that cannot be upgraded: pg_restore: from
> TOC entry 1264; 1259 32392758 VIEW pg_stat_activity_allusers master
> pg_restore: error: could not execute query: ERROR: column reference "query"
> is ambiguous LINE 32: "get_sa"."query"

> CREATE VIEW
> "publiczugmgeaxkmwph5jgobvwmvzb9freg0s7"."pg_stat_activity_allusers" AS
> SELECT "get_sa"."datid", "get_sa"."datname", "get_sa"."pid",
> "get_sa"."usesysid", "get_sa"."usename", "get_sa"."application_name",
> "get_sa"."client_addr", "get_sa"."client_hostname", "get_sa"."client_port",
> "get_sa"."backend_start", "get_sa"."xact_start", "get_sa"."query_start",
> "get_sa"."state_change", "get_sa"."wait_event_type", "get_sa"."wait_event",
> "get_sa"."state", "get_sa"."backend_xid", "get_sa"."backend_xmin",
> "get_sa"."query" FROM "publiczugmgeaxkmwph5jgobvwmvzb9freg0s7"."get_sa"()
> "get_sa"("datid", "datname", "pid", "usesysid", "usename",
> "application_name", "client_addr", "client_hostname", "client_port",
> "backend_start", "xact_start", "query_start", "state_change",
> "wait_event_type", "wait_event", "state", "backend_xid", "backend_xmin",
> "query", "backend_type");".

You're really expecting us to intuit a lot from this amount of
detail, aren't you?  But okay, I'll guess: I think this is a
view on pg_stat_activity, and it's not accounting for the fact
that pg_stat_activity gained some columns between v12 and v14.

Probably your best bet is to drop that view, do the upgrade,
and recreate the view with adjustments.

                        regards, tom lane

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux