Re: Unable to migrate from postgres-13 to 14

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jasvant Singh <jasingh(at)watermarkinsights(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Unable to migrate from postgres-13 to 14
Date: 2022-01-12 14:55:30
Message-ID: 2995239.1641999330@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jasvant Singh <jasingh(at)watermarkinsights(dot)com> writes:
> pg_restore: error: could not execute query: ERROR: function
> array_append(anyarray, anyelement) does not exist
> Command was: CREATE AGGREGATE "public"."mode"("anyelement") (
> SFUNC = "array_append",
> STYPE = "anyarray",
> INITCOND = '{}',
> FINALFUNC = "public"."_final_mode"
> );

> To work around this problem I decided to drop this aggregate in postgres-13
> and create it again with the supported version of array_append in
> postgres-14.
> But when I tried to drop it in postgres-13 I got following error:
> #drop aggregate mode("anyelement") CASCADE;
> ERROR: cannot drop function mode(anyelement) because it is required by the
> database system

I think this is trying to drop the built-in pg_catalog.mode(anyelement)
aggregate. Say DROP AGGREGATE public.mode("anyelement")

(I'd be pretty cautious about using CASCADE, too, at least till
you've seen what would get dropped.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Torsten Förtsch 2022-01-12 15:26:20 Re: WAL Archiving and base backup
Previous Message Simon Riggs 2022-01-12 14:43:26 Re: pg_stat_statements