Re: pg_upgrade Python version issue on openSUSE

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade Python version issue on openSUSE
Date: 2020-09-26 15:21:16
Message-ID: AF93DB46-A1A6-456A-A195-12F8501FE46B@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Adrian,

> On 26. Sep, 2020, at 17:07, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
> I believe the issue is here:
>
> select * from pg_pltemplate ;
>
>
> plpythonu | f | f | plpython_call_handler | plpython_inline_handler | plpython_validator | $libdir/plpython2 | NULL
> plpython2u | f | f | plpython2_call_handler | plpython2_inline_handler | plpython2_validator | $libdir/plpython2 | NULL
> plpython3u | f | f | plpython3_call_handler | plpython3_inline_handler | plpython3_validator | $libdir/plpython3 | NULL
>
>
> The default plpython is plpythonu and that points at $libdir/plpython2.
>
> The instructions here:
>
> https://www.postgresql.org/docs/12/plpython-python23.html
>
> offer a work around:
>
> "Daredevils, who want to build a Python-3-only operating system environment, can change the contents of pg_pltemplate to make plpythonu be equivalent to plpython3u, keeping in mind that this would make their installation incompatible with most of the rest of the world."

sounds like:

update pg_pltemplate
set
tmplhandler='plpython3_call_handler',
tmplinline='plpython3_inline_handler',
tmplvalidator='plpython3_validator',
tmpllibrary='$libdir/plpython3'
where
tmplname='plpythonu';

And that sounds somewhat dangerous to me, especially if I take the comment on the plpython-python23 page into account: "keeping in mind that this would make their installation incompatible with most of the rest of the world."

I'd rather not...

Cheers,
Paul

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2020-09-26 15:26:58 Re: pg_upgrade Python version issue on openSUSE
Previous Message Adrian Klaver 2020-09-26 15:17:19 Re: pg_upgrade Python version issue on openSUSE