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 1nmySx-00061J-42 for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 13:57:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nmySv-0001rf-U7 for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 13:57:53 +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 1nmySv-0001rW-LD for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 13:57:53 +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 1nmySt-00031q-JO for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 13:57:53 +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 246DvgAB2886154; Fri, 6 May 2022 09:57:42 -0400 From: Tom Lane To: Robert Haas cc: Nathan Bossart , Julien Rouhaud , Andres Freund , Michael Paquier , "Bossart, Nathan" , Fujii Masao , "wangsh.fnst@fujitsu.com" , Bharath Rupireddy , Greg Sabino Mullane , "pgsql-hackers@lists.postgresql.org" Subject: Re: make MaxBackends available in _PG_init In-reply-to: References: <20220413183040.GA2116671@nathanxps13> <20220414162215.GB2163833@nathanxps13> <1522578.1649954386@sss.pgh.pa.us> <20220418225244.GA2387491@nathanxps13> <2395586.1650324834@sss.pgh.pa.us> <20220419001220.GA2389330@nathanxps13> <2470289.1650327424@sss.pgh.pa.us> <20220419154658.GA2487941@nathanxps13> Comments: In-reply-to Robert Haas message dated "Fri, 06 May 2022 09:51:09 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2886152.1651845462.1@sss.pgh.pa.us> Date: Fri, 06 May 2022 09:57:42 -0400 Message-ID: <2886153.1651845462@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > perhaps for v16 or some future release we can think about redoing a > bunch of hooks this way. There would be some migration pain for > extension authors for sure, but then we might get to a point where > extensions can be cleanly unloaded in at least some circumstances, > instead of continuing to write silly _PG_fini() functions that > couldn't possibly ever work. I agree that _PG_fini functions as they stand are worthless. What I'm not getting is why we should care enough about that to break just about everybody's extension. Even if unloading extensions were feasible, who would bother? regards, tom lane