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 1l8S3t-0002Z0-Kc for pgsql-admin@arkaria.postgresql.org; Sat, 06 Feb 2021 18:12:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l8S3K-0000yh-A9 for pgsql-admin@arkaria.postgresql.org; Sat, 06 Feb 2021 18:11:26 +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 1l8S3K-0000yT-0T for pgsql-admin@lists.postgresql.org; Sat, 06 Feb 2021 18:11:26 +0000 Received: from mout.gmx.net ([212.227.15.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8S3D-0001BW-N3 for pgsql-admin@lists.postgresql.org; Sat, 06 Feb 2021 18:11:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612635076; bh=KsOJylK3lQQI8e1xRNTGSjk8AONScdU7hfsmkCupaoQ=; h=X-UI-Sender-Class:Subject:To:References:Cc:From:Date:In-Reply-To; b=OkItuwk/exUNox5ISID2YTgo2qeoAnU3SMjPJ8i/gwKWDDllMioBDVXoilmKgzG8s OO68IB+4ua4jNQTw/mTAUk3gq8k2DPThqZk9D3jMwSVu2u90rpVEZUpIj9xX2aCe4e BvNsntbxng4m0l32VlIfHebJnX/J4yB99lhZu0Kk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.20] ([83.171.169.185]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIdeR-1lC2xl2GfN-00EgUQ; Sat, 06 Feb 2021 19:11:16 +0100 Subject: Re: pg_upgrade(?) not cleaning up old extensions To: "pgsql-admin@lists.postgresql.org" References: <61ea1e0b-442d-e6c8-1728-916f8376aa11@gmx.net> <191204.1612631344@sss.pgh.pa.us> Cc: Tom Lane From: Thomas Kellerer Message-ID: <75d85e74-4d01-b3c9-7772-0de1a64a1353@gmx.net> Date: Sat, 6 Feb 2021 19:11:15 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <191204.1612631344@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:qmKZ7f+tdQ2COh8YYChCs7atOf/BNKr2sCCJk7GSxkjQu3s8uwW lKMGpkzGqIXAP72xYR/kizww3TqLycohxoiw39ZZkPWXG1Le7Et8Rxr+demrTQ3Sa53VnLk pQEFJ1lAMES4nmx50XCsKe0jNvU154++iYZ0Zf5TRe48W7JqODYpgFE515JDyjZQXvje01J 57M1k5x1o2lM+el5Ffrkw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ro+HmpQBcHw=:W0pZd0p1Jb+xKzvjI5zttb EjTzax+jQxF/XWxzCtGeNuJnt/PrUTCAYEelOxmwvjMj2Adjcr7cfQmfRvPOPsQWbxeWmL3OD IDjemFlS/Hcssk8IdXHj+pfjXWkifyi9M/OJQvh5DtYLZ1G/vWl4EFpEKFNadCqpk2Yd4sfnd ZcMQf6jnIxahS9zb6DBjnDVm/grsbAkjsb3K8UbJq27jXKhQUe0GrViM0Z2vfF8UpvSOsSrj7 mUzyyoT8eB0SW65QBVxCIYo/bzDABiXbwFRisc7QpQK+i5dtbij/RrY84Ir2afTigVRjS0cTW d73maiOy/0q8Vtntg5shtqu0cjHFg7T1jomqQ1my/Zc4sru3hPecsLSNBn1xxdoBWf2q5bnUw O35YoLrNOIbTB0oLhcQqYj2sA0+9lT1/4a29fYZ/n6LU/tP3O7+89RCqV/lXS6VtxDXL2AVgT ggQCjNKj27phnU2mCrYo4uQ+vITjEBcP14UJ06IJRZHQpffuHEKjdYKPGegupO6IFToTStKMU n1PWkJQ4SpSN0JlMvIR7fStUMQY7VrIu/rSGrjHupyTyJAt6WDiaoLm42zAICk1xoEv7R9UDH sglhdc7oWBcyu+LGVDM7+4TfI3qq8OtJy1MAGvgJUrWFSnfHN85ypVUXixq23Y2V6qXZ73Z7z n9VcW0nIEuG7lQG7/rOucb9+AQH9Ur5x/VI0OVHQq+8JR4kEyQwr/62wJIVJczg+5qjTyO0fI oZfYMRgypqQUFULOzkt2znxsARdp1jOZjrCmUDwBI3I5vsSIwWwT+7kLQwbmOgjZgs8WUsvzP 1KjvOsam9MgBeP8TTczZfrdUp98zPJ7qeiB2aDgB0OYrmT4e9nvS4OuLNs1g0u+tVXnc00DlM DgBrvjTAqfB8XmSMPBzA== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom Lane schrieb am 06.02.2021 um 18:09: >> I have noticed that when I look at pg_available_extensions many >> extensions are listed with multiple versions even though only the >> latest one is actually used. > > Yes, that view is supposed to list the versions that are available > to be installed. Typically, installation scripts for several back > versions exist on disk. This is an artifact of the way that we > approach providing extension upgrade capability, but it can be handy > if you want to test SQL code against back versions. > > As an example, contrib/adminpack installs > > adminpack--1.0.sql > adminpack--1.0--1.1.sql > adminpack--1.1--2.0.sql > adminpack--2.0--2.1.sql > > Ordinarily, when you "create extension adminpack", it runs all four > of those scripts in sequence and you end up with the 2.1 SQL objects. > But if you ask to install some earlier version, it just stops after > the appropriate script. So pg_available_extensions shows 1.0, 1.1, > 2.0, and 2.1 as available versions. (Of course, the main reason > for having the delta scripts is to support "alter extension upgrade".) 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?