Re: pg_upgrade from 12 to 13 failes with plpython2 - Mailing list pgsql-general

From Magnus Hagander
Subject Re: pg_upgrade from 12 to 13 failes with plpython2
Date
Msg-id CABUevEzHz4cEtxDQLkdVVzAzfQtWXs=hOiSxD=SCDZwoXeKjng@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade from 12 to 13 failes with plpython2  (Marcin Giedz <marcin.giedz@arise.pl>)
Responses Re: pg_upgrade from 12 to 13 failes with plpython2  (Marcin Giedz <marcin.giedz@arise.pl>)
List pgsql-general
On Wed, Nov 18, 2020 at 8:11 AM Marcin Giedz <marcin.giedz@arise.pl> wrote:
>
> but my question still remains the same - what causes pg_upgrade failure - are functions the reason? what I did was to
deletethese 2 rows from pg_pltemplate as I thought this may help:
 
>
> postgres=# delete from pg_pltemplate where tmplname = 'plpython2u';
> DELETE 1
> postgres=# delete from pg_pltemplate where tmplname = 'plpythonu';
> DELETE 1
>
>
> but pg_upgrade still complains about plpython2:
>
> cat loadable_libraries.txt
> could not load library "$libdir/plpython2": ERROR:  could not access file "$libdir/plpython2": No such file or
directory
> In database: alaxx
> In database: template1


It's not the template that's interesting, it's the language itself you
need to drop. Log into each database and try to do that, and you will
get something like this if you still have functions using it:
postgres=# DROP LANGUAGE plpython2u;
ERROR:  cannot drop language plpython2u because other objects depend on it
DETAIL:  function testfunc() depends on language plpython2u
HINT:  Use DROP ... CASCADE to drop the dependent objects too.

If you have no functions using it, it will just go away, and once you
have dropped it in both databases you should be good to go.

And of course, if there are functions depending on it, you should
rebuild those on plpython3u before you drop plpython2u (or drop the
functions if they're not in use).

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-general by date:

Previous
From: Devrim Gündüz
Date:
Subject: Re: Postgresql13-devel fails to install on centos 7
Next
From: Ron
Date:
Subject: Re: vacuum vs vacuum full