From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Marcin Giedz <marcin(dot)giedz(at)arise(dot)pl> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Devrim Gündüz <devrim(at)gunduz(dot)org>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_upgrade from 12 to 13 failes with plpython2 |
Date: | 2020-11-18 09:36:10 |
Message-ID: | CABUevEzHz4cEtxDQLkdVVzAzfQtWXs=hOiSxD=SCDZwoXeKjng@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Nov 18, 2020 at 8:11 AM Marcin Giedz <marcin(dot)giedz(at)arise(dot)pl> wrote:
>
> but my question still remains the same - what causes pg_upgrade failure - are functions the reason? what I did was to delete these 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/
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2020-11-18 09:38:14 | Re: vacuum vs vacuum full |
Previous Message | Devrim Gündüz | 2020-11-18 09:20:39 | Re: Postgresql13-devel fails to install on centos 7 |