Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfHcW-00041t-FQ for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 07:11:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfHcV-0001uB-5F for pgsql-general@arkaria.postgresql.org; Wed, 18 Nov 2020 07:11:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfHcU-0001u2-RL for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 07:11:10 +0000 Received: from mail.arise.pl ([77.79.204.235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfHcP-0002tB-U3 for pgsql-general@lists.postgresql.org; Wed, 18 Nov 2020 07:11:09 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.arise.pl (Postfix) with ESMTP id C8EFB34D387; Wed, 18 Nov 2020 08:11:04 +0100 (CET) Received: from mail.arise.pl ([127.0.0.1]) by localhost (mail1.arise [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id DzqWxxMsPrMc; Wed, 18 Nov 2020 08:10:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.arise.pl (Postfix) with ESMTP id 6146434D4F3; Wed, 18 Nov 2020 08:10:53 +0100 (CET) X-Virus-Scanned: amavisd-new at arise.pl Received: from mail.arise.pl ([127.0.0.1]) by localhost (mail1.arise [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JDc080nHEQ_e; Wed, 18 Nov 2020 08:10:53 +0100 (CET) Received: from mail1.arise (mail1.arise [172.16.198.9]) by mail.arise.pl (Postfix) with ESMTP id 2514334D4DF; Wed, 18 Nov 2020 08:10:53 +0100 (CET) Date: Wed, 18 Nov 2020 08:10:52 +0100 (CET) From: Marcin Giedz To: Adrian Klaver , Tom Lane , Devrim =?utf-8?B?R8O8bmTDvHo=?= , pgsql-general Message-ID: <410666958.1483934.1605683452910.JavaMail.zimbra@arise.pl> In-Reply-To: References: <1965058112.1483134.1605643217808.JavaMail.zimbra@arise.pl> <7a90ff88645ac6efcdc1436365a07d63b04b90d2.camel@gunduz.org> <8174b8ab-b082-b136-a933-4aceaf15a985@aklaver.com> <7820164d-5086-b3e2-e200-3f02f07b6280@aklaver.com> <938921.1605648230@sss.pgh.pa.us> Subject: Re: pg_upgrade from 12 to 13 failes with plpython2 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1483933_1545877087.1605683452908" X-Mailer: Zimbra 8.6.0_GA_1153 (ZimbraWebClient - FF82 (Linux)/8.6.0_GA_1153) Thread-Topic: pg_upgrade from 12 to 13 failes with plpython2 Thread-Index: AFAAZzOie1eCWXWjgrmqfezAHIEzwA== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_1483933_1545877087.1605683452908 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable but my question still remains the same - what causes pg_upgrade failure - a= re functions the reason? what I did was to delete these 2 rows from pg_plte= mplate as I thought this may help:=20 postgres=3D# delete from pg_pltemplate where tmplname =3D 'plpython2u';=20 DELETE 1=20 postgres=3D# delete from pg_pltemplate where tmplname =3D 'plpythonu';=20 DELETE 1=20 but pg_upgrade still complains about plpython2:=20 cat loadable_libraries.txt=20 could not load library "$libdir/plpython2": ERROR: could not access file "$= libdir/plpython2": No such file or directory=20 In database: alaxx=20 In database: template1=20 marcin@carbon2:~$ psql -U pgsql -h 192.168.89.64 alaxx=20 psql (12.4 (Ubuntu 12.4-1))=20 Type "help" for help.=20 argosrm=3D# select * from pg_pltemplate ;=20 tmplname | tmpltrusted | tmpldbacreate | tmplhandler | tmplinline | tmplval= idator | tmpllibrary | tmplacl=20 ------------+-------------+---------------+------------------------+-------= -------------------+---------------------+-------------------+---------=20 plpgsql | t | t | plpgsql_call_handler | plpgsql_inline_handler | plpgsql_v= alidator | $libdir/plpgsql |=20 pltcl | t | t | pltcl_call_handler | | | $libdir/pltcl |=20 pltclu | f | f | pltclu_call_handler | | | $libdir/pltcl |=20 plperl | t | t | plperl_call_handler | plperl_inline_handler | plperl_valid= ator | $libdir/plperl |=20 plperlu | f | f | plperlu_call_handler | plperlu_inline_handler | plperlu_v= alidator | $libdir/plperl |=20 plpython3u | f | f | plpython3_call_handler | plpython3_inline_handler | pl= python3_validator | $libdir/plpython3 |=20 (6 rows)=20 argosrm=3D# \q=20 marcin@carbon2:~$ psql -U pgsql -h 192.168.89.64 template1=20 psql (12.4 (Ubuntu 12.4-1))=20 Type "help" for help.=20 template1=3D# select * from pg_pltemplate ;=20 tmplname | tmpltrusted | tmpldbacreate | tmplhandler | tmplinline | tmplval= idator | tmpllibrary | tmplacl=20 ------------+-------------+---------------+------------------------+-------= -------------------+---------------------+-------------------+---------=20 plpgsql | t | t | plpgsql_call_handler | plpgsql_inline_handler | plpgsql_v= alidator | $libdir/plpgsql |=20 pltcl | t | t | pltcl_call_handler | | | $libdir/pltcl |=20 pltclu | f | f | pltclu_call_handler | | | $libdir/pltcl |=20 plperl | t | t | plperl_call_handler | plperl_inline_handler | plperl_valid= ator | $libdir/plperl |=20 plperlu | f | f | plperlu_call_handler | plperlu_inline_handler | plperlu_v= alidator | $libdir/plperl |=20 plpython3u | f | f | plpython3_call_handler | plpython3_inline_handler | pl= python3_validator | $libdir/plpython3 |=20 (6 rows)=20 what can I do next ?=20 Thx=20 Marcin=20 Od: "Adrian Klaver" =20 Do: "Devrim G=C3=BCnd=C3=BCz" , "Tom Lane" =20 DW: "Marcin Giedz" , "pgsql-general" =20 Wys=C5=82ane: wtorek, 17 listopad 2020 23:30:44=20 Temat: Re: pg_upgrade from 12 to 13 failes with plpython2=20 On 11/17/20 2:17 PM, Devrim G=C3=BCnd=C3=BCz wrote:=20 >=20 > Hi,=20 >=20 > On Tue, 2020-11-17 at 16:23 -0500, Tom Lane wrote:=20 >> You're confusing what the source code can do (which is what the=20 >> manual documents) versus what individual packagers choose to support.=20 >> The packagers frequently don't have a lot of choice in the matter;=20 >> once their platform drops python2, they can't support plpython2.=20 >=20 First let me say:=20 1) I don't use Python 2 anymore.=20 2) I have converted my plpython(2)u functions to plpythonu3u=20 3) I don't use RH family distros.=20 > Well, CentOS 8 "supports" PY2, however given that Christoph also=20 > dropped PY2 support in Debian packages as of PostgreSQL 12 [1], and=20 > given that *Python 2 is unsupported* anyway, I just wanted to drop=20 > support at this point.=20 Read that sentence again and see the inherent disconnect between the=20 beginning and end.=20 As a packager you are in charge of how the packaging is done. Still=20 announcing a change that effectively nullifies the documentation would=20 to me be something that should be announced somewhere else than a list=20 that I'm guessing 99% of the users don't read.=20 >=20 > FWIW, older PostgreSQL major versions still have PY 2 support. This is=20 > for PostgreSQL 13 only.=20 >=20 > [1] : https://www.postgresql.org/message-id/20200522080114.GA449430%40msg= .df7cb.de=20 >=20 > Regards,=20 >=20 --=20 Adrian Klaver=20 adrian.klaver@aklaver.com=20 --=20 Pozdrawiam=20 Marcin Giedz=20 Wiceprezes Zarz=C4=85du=20 ARISE Sp. z o.o.=20 mob. +48 606 673 977=20 mail: marcin.giedz@arise.pl=20 Al. Solidarno=C5=9Bci 117=20 00-140 Warszawa=20 tel. +48 (22) 440 56 20=20 fax +48 (22) 440 56 22=20 http://www.arise.pl=20 Grupa ARISE: ARISE Sp. z o.o. (podmiot dominuj=C4=85cy), ARISE Services S.A= ., Al. Solidarno=C5=9Bci 117, 00-140 Warszawa, S=C4=85d Rejonowy dla m. st.= Warszawy w Warszawie XII Wydzia=C5=82 Gospodarczy Krajowego Rejestru S=C4= =85dowego, KRS 0000316860, REGON 141595449, NIP 5272590610, kapita=C5=82 za= k=C5=82adowy wp=C5=82acony 250,000.00 z=C5=82.=20 ------=_Part_1483933_1545877087.1605683452908 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
but my question still remains the same - wha= t causes pg_upgrade failure - are functions the reason? what I did was to d= elete these 2 rows from pg_pltemplate as I thought this may help:

postgres=3D# delete from pg_pltemplate= where tmplname =3D 'plpython2u';
DELETE 1
postgres=3D# delete from p= g_pltemplate where tmplname =3D 'plpythonu';
DELETE 1


but pg_upgrade still complains about p= lpython2:

cat loadable_libraries.txt
could not load library "$libdir/plpyth= on2": ERROR:  could not access file "$libdir/plpython2": No such file = or directory
In database: alaxx
In database: template1
=

marcin@carbon2:~$ psql -U pgsql -h 192.168= .89.64 alaxx
psql (12.4 (Ubuntu 12.4-1))
Type "help" for help.
argosrm=3D# select * from pg_pltemplate ;
  tmplname  | tmplt= rusted | tmpldbacreate |      tmplhandler &nb= sp;     |        tmp= linline        |    tmplv= alidator    |    tmpllibrary   = ; | tmplacl
------------+-------------+---------------+----------------= --------+--------------------------+---------------------+-----------------= --+---------
 plpgsql    | t    =        | t      = ;       | plpgsql_call_handler   | = plpgsql_inline_handler   | plpgsql_validator   | $libdi= r/plpgsql   |
 pltcl      | t&n= bsp;          | t  &= nbsp;          | pltcl_call_ha= ndler     |       &n= bsp;            = ;      |       =             &nb= sp; | $libdir/pltcl     |
 pltclu  &= nbsp;  | f          = | f            = ; | pltclu_call_handler    |     &n= bsp;            = ;        |     =             &nb= sp;   | $libdir/pltcl     |
 plperl&= nbsp;    | t        =    | t          = ;   | plperl_call_handler    | plperl_inline_handl= er    | plperl_validator    | $libdir/plperl&= nbsp;   |
 plperlu    | f  &nbs= p;        | f    &nb= sp;        | plperlu_call_handler &= nbsp; | plperlu_inline_handler   | plperlu_validator   = | $libdir/plperl    |
 plpython3u | f  &n= bsp;        | f    &= nbsp;        | plpython3_call_handler | = plpython3_inline_handler | plpython3_validator | $libdir/plpython3 |
(6= rows)

argosrm=3D# \q
marcin@carbon2:~$ psql -U pgsql -h 192.168.= 89.64 template1
psql (12.4 (Ubuntu 12.4-1))
Type "help" for help.
=
template1=3D# select * from pg_pltemplate ;
  tmplname  | = tmpltrusted | tmpldbacreate |      tmplhandler&nbs= p;      |       = ; tmplinline        |    = tmplvalidator    |    tmpllibrary  =   | tmplacl
------------+-------------+---------------+-----------= -------------+--------------------------+---------------------+------------= -------+---------
 plpgsql    | t   &= nbsp;       | t     =         | plpgsql_call_handler &nbs= p; | plpgsql_inline_handler   | plpgsql_validator   | $= libdir/plpgsql   |
 pltcl      = | t           | t &n= bsp;           | pltcl_ca= ll_handler     |      &nb= sp;            =        |      &= nbsp;           &nbs= p;  | $libdir/pltcl     |
 pltclu &n= bsp;   | f         &= nbsp; | f           =   | pltclu_call_handler    |    &nb= sp;            =          |    &= nbsp;           &nbs= p;    | $libdir/pltcl     |
 pl= perl     | t       &= nbsp;   | t         =     | plperl_call_handler    | plperl_inline_= handler    | plperl_validator    | $libdir/pl= perl    |
 plperlu    | f  = ;         | f   &nbs= p;         | plperlu_call_handler&n= bsp;  | plperlu_inline_handler   | plperlu_validator &n= bsp; | $libdir/plperl    |
 plpython3u | f &nb= sp;         | f   &n= bsp;         | plpython3_call_handl= er | plpython3_inline_handler | plpython3_validator | $libdir/plpython3 | <= br>(6 rows)


what can I do next ?
<= div>

Thx
Marcin


Od: "Adrian Klaver" <adrian.klaver@ak= laver.com>
Do: "Devrim G=C3=BCnd=C3=BCz" <devrim@gunduz.org= >, "Tom Lane" <tgl@sss.pgh.pa.us>
DW: "Marcin Giedz" <= ;marcin.giedz@arise.pl>, "pgsql-general" <pgsql-general@lists.postgre= sql.org>
Wys=C5=82ane: wtorek, 17 listopad 2020 23:30:44
Temat: Re: pg_upgrade from 12 to 13 failes with plpython2
On 11/17/20 2:17 PM, Devrim G=C3=BCnd=C3=BCz wrote:
>
> = Hi,
>
> On Tue, 2020-11-17 at 16:23 -0500, Tom Lane wrote:
= >> You're confusing what the source code can do (which is what the>> manual documents) versus what individual packagers choose to supp= ort.
>> The packagers frequently don't have a lot of choice in the= matter;
>> once their platform drops python2, they can't support = plpython2.
>

First let me say:

1) I don't use Python 2= anymore.

2) I have converted my plpython(2)u functions to plpythonu= 3u

3) I don't use RH family distros.

> Well, CentOS 8 "sup= ports" PY2, however given that Christoph also
> dropped PY2 support i= n Debian packages as of PostgreSQL 12 [1], and
> given that *Python 2= is unsupported* anyway, I just wanted to drop
> support at this poin= t.

Read that sentence again and see the inherent disconnect between = the
beginning and end.

As a packager you are in charge of how th= e packaging is done. Still
announcing a change that effectively nullifi= es the documentation would
to me be something that should be announced = somewhere else than a list
that I'm guessing 99% of the users don't rea= d.

>
> FWIW, older PostgreSQL major versions still have PY= 2 support. This is
> for PostgreSQL 13 only.

>
> [1= ] : https://www.postgresql.org/message-id/20200522080114.GA449430%40msg.df7= cb.de
>
> Regards,
>


--
Adrian Klaveradrian.klaver@aklaver.com

--
Pozdraw= iam
Marcin Giedz
Wiceprezes Zarz=C4=85du

ARISE Sp. = z o.o.
mob. +48 606 673 977
mail: marcin.giedz@arise.pl

=
Al. Solidarno=C5=9Bci 117
00-140 Warszawa
tel. +48 (22) 440 56 2= 0
fax  +48 (22) 440 56 22
http://www.arise.pl

= Grupa ARISE: ARISE Sp. z o.o. (podmiot dominuj=C4=85cy), ARISE Services S.A= ., Al. Solidarno=C5=9Bci 117, 00-140 Warszawa, S=C4=85d Rejonowy dla m. st.= Warszawy w Warszawie XII Wydzia=C5=82 Gospodarczy Krajowego Rejestru S=C4= =85dowego, KRS 0000316860, REGON 141595449, NIP 5272590610, kapita=C5=82 za= k=C5=82adowy wp=C5=82acony 250,000.00 z=C5=82.

<= /div> ------=_Part_1483933_1545877087.1605683452908--