Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raMIn-009OFW-22 for pgsql-general@arkaria.postgresql.org; Wed, 14 Feb 2024 20:56:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1raMIl-008h9q-Lm for pgsql-general@arkaria.postgresql.org; Wed, 14 Feb 2024 20:56:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raMIl-008h9i-B8 for pgsql-general@lists.postgresql.org; Wed, 14 Feb 2024 20:56:19 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raMIi-006li0-JX for pgsql-general@lists.postgresql.org; Wed, 14 Feb 2024 20:56:18 +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 41EKuF733113021; Wed, 14 Feb 2024 15:56:15 -0500 From: Tom Lane To: Ayush Vatsa cc: pgsql-general@lists.postgresql.org Subject: Re: Query regarding function cleanup in extension upgrade path In-reply-to: References: <2899690.1707928657@sss.pgh.pa.us> Comments: In-reply-to Ayush Vatsa message dated "Wed, 14 Feb 2024 22:30:46 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3113019.1707944175.1@sss.pgh.pa.us> Date: Wed, 14 Feb 2024 15:56:15 -0500 Message-ID: <3113020.1707944175@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ayush Vatsa writes: > Just two follow up queries regarding this - > 1. Suppose I created a new version 1.1 in which I reduce the C function to > throw an error then ship it, will users get the .c latest file immediately > and their old function will throw error but they have to use ALTER > EXTENSION xyz UPGRADE TO 1.1 to use the latest objects defined in 1.1.sql. > Is this the correct understanding? Yes, if you do it like that then once they install the new shlib their function will be broken until they do ALTER EXTENSION UPGRADE. > 2. While going through the contrib folder I find that in the regress test > there are two .out files with respect to a single .sql file, example > citext.out and citext_1.out wrt citext.sql. Why is it so? Even in git blame > , I couldn't find much! We use that when the expected test output is environment-dependent. If the diff between the .out files isn't pretty self-explanatory, you can try checking the git log for the "_1.out" file to see why it was created. regards, tom lane