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 1kMBnx-0001xy-RD for pgsql-general@arkaria.postgresql.org; Sat, 26 Sep 2020 15:08:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kMBnv-0005vC-5I for pgsql-general@arkaria.postgresql.org; Sat, 26 Sep 2020 15:08:03 +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 1kMBnt-0005t5-Fj for pgsql-general@lists.postgresql.org; Sat, 26 Sep 2020 15:08:02 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMBnp-0004vg-0n for pgsql-general@lists.postgresql.org; Sat, 26 Sep 2020 15:08:00 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 81B10A64; Sat, 26 Sep 2020 11:07:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 26 Sep 2020 11:07:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=f ddKgDm5zm/wyYqfV9VS3JB7Da7P71Sk6TDXEGCErbQ=; b=qH6pflnao4VHFZk+b KxzmVw+Az8zz/nU1c4EhctEuiarviWZnw32otrjbHVgR7njp/QtR9d+9EhJiNmaj 6ZXfzvvch+U3KgJAdTYdDrvFqMszinBowBzP9JFKKdahBQzpb5+/G7ybRnIq4qo/ UEw5qg9Ey8FlI7UDuG6BMi637HyTAd1D6xFKr9vUQZ6IWrAX6u9++xp7vc45W32V OHxO1mv8IVCD49w6pxHK6+FG0HtiZCEo9LH9a/XDd8iRvQPtCaoCUCI2icF61wAv MBunsLsEwn3K65NdPodwDspQYcI3qvvLLg3e2wbRNEnmo0NhkCPKfTnciC1dVTTo n4GCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=fddKgDm5zm/wyYqfV9VS3JB7Da7P71Sk6TDXEGCEr bQ=; b=ZurlupvOJKtFYYdI8cshXDVOy1GgxGGYf5AyhKqvO4EUntKTNbXQTsRUd 1EGzhan58oZe1Jq1cb7/fgruZTmcjW1mrCGTkOGVDlC8x4M50807GPZCMKIzORJO roCSuokOwZh50eStKMZcy1SkeyenMOFucKtHNo7WziNK2mpNaJOdwpT4K34Se0RB 2xuggHX8rU/HnOuWbapjtfYKlV1Py62eni0dNDVQNQj0VpaQJQ0omtFadqLmCXpF EiyqYIp9eIrcY9Uej9M93BJfObZb5BdDnvSBlRV/FgxjOq8H0wu5Qphm9F9wJSKa 5zuG0UdaVd1ropMPwXOgl4qI17pIg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgdekiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepveetjedtieekteefhffhhfetledvkeffvedugeejueek hffgvdeileeitdekvefhnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenuc fkphepjeehrddujedvrdehrddvfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 4DD1F306467E; Sat, 26 Sep 2020 11:07:52 -0400 (EDT) Subject: Re: pg_upgrade Python version issue on openSUSE To: Tom Lane , =?UTF-8?Q?Paul_F=c3=b6rster?= Cc: PostgreSQL General References: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com> <1FB046FC-BE42-4D66-B0AE-E94B6CB9498E@gmail.com> <06317862-1908-48C7-8766-F6D1B4BFEB9F@gmail.com> <1990004.1601129252@sss.pgh.pa.us> <9D64B513-77D4-41D9-87E5-0727FAF96C84@gmail.com> <1999120.1601131766@sss.pgh.pa.us> From: Adrian Klaver Message-ID: Date: Sat, 26 Sep 2020 08:07:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <1999120.1601131766@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/26/20 7:49 AM, Tom Lane wrote: > =?utf-8?Q?Paul_F=C3=B6rster?= writes: >> On 26. Sep, 2020, at 16:07, Tom Lane wrote: >>> However, I don't understand how "drop extension plpythonu" >>> worked for you, given your previous query showing that >>> that extension wasn't installed. > >> just checked with another 12.4. It's the same: > >> postgres=# select * from pg_available_extension_versions where installed; >> name | version | installed | superuser | relocatable | schema | requires | comment >> ---------+---------+-----------+-----------+-------------+------------+----------+-------------------------------------------------------------- >> plperlu | 1.0 | t | t | f | pg_catalog | | PL/PerlU untrusted procedural language >> dblink | 1.2 | t | t | t | | | connect to other PostgreSQL databases from within a database >> plpgsql | 1.0 | t | f | f | pg_catalog | | PL/pgSQL procedural language >> plperl | 1.0 | t | f | f | pg_catalog | | PL/Perl procedural language >> (4 rows) > >> postgres=# drop extension plpythonu ; >> DROP EXTENSION >> postgres=# create extension plpython3u ; >> CREATE EXTENSION > > Actually, now that I think about it, you're querying the wrong view. > I'm too lazy to check the source code right now, but I'm pretty sure > that pg_available_extension_versions is mostly driven off what control > files exist in the on-disk libdir. But that may have little to do with > what's in the system catalogs. You should have checked pg_extension, > or just "\dx" in psql. 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." > > regards, tom lane > > -- Adrian Klaver adrian.klaver@aklaver.com