Re: pg_upgrade from 12 to 13 failes with plpython2

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: pg_upgrade from 12 to 13 failes with plpython2
Дата
Msg-id CABUevEzHz4cEtxDQLkdVVzAzfQtWXs=hOiSxD=SCDZwoXeKjng@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_upgrade from 12 to 13 failes with plpython2  (Marcin Giedz <marcin.giedz@arise.pl>)
Ответы Re: pg_upgrade from 12 to 13 failes with plpython2  (Marcin Giedz <marcin.giedz@arise.pl>)
Список 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 по дате отправления:

Предыдущее
От: Devrim Gündüz
Дата:
Сообщение: Re: Postgresql13-devel fails to install on centos 7
Следующее
От: Ron
Дата:
Сообщение: Re: vacuum vs vacuum full