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