From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arthur Ramsey <arthur.ramsey@code42.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Failed upgrade from 12.11 to 14.4
Date: Wed, 01 Mar 2023 14:54:30 -0500
Message-ID: <1547498.1677700470@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEJqy4WSLUO+j86e9T9rKXLqg=RoNzzS==my0Ymzsa0nYo-s2A@mail.gmail.com>
References: <CAEJqy4WSLUO+j86e9T9rKXLqg=RoNzzS==my0Ymzsa0nYo-s2A@mail.gmail.com>
Arthur Ramsey <arthur.ramsey@code42.com> 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, arthur.ramsey@code42.com
Subject: Re: Failed upgrade from 12.11 to 14.4
In-Reply-To: <1547498.1677700470@sss.pgh.pa.us>
References: <CAEJqy4WSLUO+j86e9T9rKXLqg=RoNzzS==my0Ymzsa0nYo-s2A@mail.gmail.com> <1547498.1677700470@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