Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hxcO1-00012D-5W for pgsql-admin@arkaria.postgresql.org; Tue, 13 Aug 2019 19:23:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hxcNz-0000M4-Rq for pgsql-admin@arkaria.postgresql.org; Tue, 13 Aug 2019 19:23:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hxcNz-0000IJ-Go for pgsql-admin@lists.postgresql.org; Tue, 13 Aug 2019 19:23:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hxcNt-0002PA-9C for pgsql-admin@lists.postgresql.org; Tue, 13 Aug 2019 19:23:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x7DJN1lr013170; Tue, 13 Aug 2019 15:23:01 -0400 From: Tom Lane To: Robert Pang cc: pgsql-admin@lists.postgresql.org Subject: Re: Are extensions downgrade-safe? In-reply-to: References: Comments: In-reply-to Robert Pang message dated "Tue, 13 Aug 2019 12:01:12 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13168.1565724181.1@sss.pgh.pa.us> Date: Tue, 13 Aug 2019 15:23:01 -0400 Message-ID: <13169.1565724181@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Pang writes: > In PostgreSQL, there are times where a new version of an extension is > included in a minor-version upgrade. If I do a minor-version upgrade of my > PG database, upgrade the version of the extension and then have a need to > revert (downgrade) to the old PG minor version, what should I do with the > extension? It'd really depend on what the particular extension upgrade script did. A lot of the time you wouldn't have any issue, but there are probably cases where reversing the effect of the upgrade script would be advisable. We don't prepare downgrade scripts for the contrib modules; the question comes up so seldom that it doesn't seem worth the maintenance effort. But you could likely make one by studying the upgrade script and reversing whatever it did. regards, tom lane