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 1kMBW0-0000vU-1p for pgsql-general@arkaria.postgresql.org; Sat, 26 Sep 2020 14:49:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kMBVy-0006VA-Hv for pgsql-general@arkaria.postgresql.org; Sat, 26 Sep 2020 14:49:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMBVy-0006V3-AS for pgsql-general@lists.postgresql.org; Sat, 26 Sep 2020 14:49:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMBVw-0006bz-Ct for pgsql-general@lists.postgresql.org; Sat, 26 Sep 2020 14:49:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 08QEnQKl1999121; Sat, 26 Sep 2020 10:49:26 -0400 From: Tom Lane To: =?utf-8?Q?Paul_F=C3=B6rster?= cc: PostgreSQL General Subject: Re: pg_upgrade Python version issue on openSUSE In-reply-to: <9D64B513-77D4-41D9-87E5-0727FAF96C84@gmail.com> 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> Comments: In-reply-to =?utf-8?Q?Paul_F=C3=B6rster?= message dated "Sat, 26 Sep 2020 16:35:07 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1999119.1601131766.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 26 Sep 2020 10:49:26 -0400 Message-ID: <1999120.1601131766@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?utf-8?Q?Paul_F=3DC3=3DB6rster?=3D 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=3D# select * from pg_available_extension_versions where install= ed; > 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=3D# drop extension plpythonu ; > DROP EXTENSION > postgres=3D# 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. regards, tom lane