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 1l8ScO-00045p-AP for pgsql-admin@arkaria.postgresql.org; Sat, 06 Feb 2021 18:47:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l8ScN-0007cb-6U for pgsql-admin@arkaria.postgresql.org; Sat, 06 Feb 2021 18:47:39 +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 1l8ScM-0007cU-VQ for pgsql-admin@lists.postgresql.org; Sat, 06 Feb 2021 18:47:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8ScG-0001Qr-Gs for pgsql-admin@lists.postgresql.org; Sat, 06 Feb 2021 18:47:38 +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 116IlQ9r248750; Sat, 6 Feb 2021 13:47:26 -0500 From: Tom Lane To: Thomas Kellerer cc: "pgsql-admin@lists.postgresql.org" Subject: Re: pg_upgrade(?) not cleaning up old extensions In-reply-to: <75d85e74-4d01-b3c9-7772-0de1a64a1353@gmx.net> References: <61ea1e0b-442d-e6c8-1728-916f8376aa11@gmx.net> <191204.1612631344@sss.pgh.pa.us> <75d85e74-4d01-b3c9-7772-0de1a64a1353@gmx.net> Comments: In-reply-to Thomas Kellerer message dated "Sat, 06 Feb 2021 19:11:15 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <248748.1612637246.1@sss.pgh.pa.us> Date: Sat, 06 Feb 2021 13:47:26 -0500 Message-ID: <248749.1612637246@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Kellerer writes: > Tom Lane schrieb am 06.02.2021 um 18:09: >> Yes, that view is supposed to list the versions that are available >> to be installed. > So if it is expected to see multiple versions through that view, > then why do the multiple versions go away when I dump & reload > the database? Oh, sorry, -ENOCAFFEINE. I was thinking of pg_available_extension_versions, which does what I described. As for pg_available_extensions, that should produce just one row per extension control file. The only way I can see for it to produce more is if you have duplicate entries in pg_extension, which also seems unlikely if not impossible. Maybe you should provide more detail about exactly what you are seeing, what is in pg_extension, and what is in your installation's .../share/extension/ directory. regards, tom lane