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 1nmzrU-0001Ye-Vs for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 15:27:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nmzrS-00061v-Am for pgsql-hackers@arkaria.postgresql.org; Fri, 06 May 2022 15:27:18 +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 1nmzrS-00061l-03 for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 15:27:18 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nmzrP-0003tg-JX for pgsql-hackers@lists.postgresql.org; Fri, 06 May 2022 15:27:17 +0000 Received: by mail-pj1-x102e.google.com with SMTP id a15-20020a17090ad80f00b001dc2e23ad84so11092406pjv.4 for ; Fri, 06 May 2022 08:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qS4nZ07RtsWROqMX5/b1gR2wgD03vJJNx6c0ljsxnEg=; b=LseigWp6cGVWiiSwN3nVbp6DsZ2f2RGcO7xR8XKhz7zwbNDd6VdWAQSoVOMvNxTqkL 0N/Jk8RhDu23WM1ZsAxpTjDRfRWDv0PukhBt3d68EC6cC+tUVfwIaEl7yl3sAfBPT8Pu JlMMm4BbcGKL73WunQ4qhwsGkugPs+kBMkPg9UnyBNLPowEq+ywqcRSP6OcHvHNRknSh 3b3PN5pKgX1PJnVP/LppaMO/5qHf/sWVGgPq+YJcrljps0J7UUwfbJGFgIKVGvCXhVtx BWt08tsieSvl4hQ8hD2biWu/f19h6gpa4TCFDDonJAAP2IqDbwggSPHm1j2/dwxmpzlJ X6qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qS4nZ07RtsWROqMX5/b1gR2wgD03vJJNx6c0ljsxnEg=; b=Ts3BHui1U2fde26zuSkrobVzPyn3f1y3S3mjboq1DfeLEgljqFTZrFORS2DsS8cCLq fot/7Hq9GSftShFf71QL+YpvMMZjiDjlkWf/wm7DCniSYMG94iCiarSik6JmuvFmNkEJ R7iNH7o8ogOSfhsL1Ghrxiwo+RUlNZsy3qgN59cwnAXR+cQ5M85ec5MdjhH/+0j8pJlT POIotvBj1pGLsfR8wWpo+bEit9MGofX4dPhMrrFDgpRMwqW22NpNR4Z6U58Q4lIZJwor W3NtaUpP685ikaMF/eIKr5ixP+VAw+rkUt9Lct6tEP7WkPR80dbzZWmouyHlYppGh+jQ DrDg== X-Gm-Message-State: AOAM532qTnZiI0vSh6T3CO1xglnVmA65FN9PZpTm15kP3H0Hx7WnKYDS 8XNrO0uwqNdHhdw/CHvkiaE= X-Google-Smtp-Source: ABdhPJxoz5aYHeO1MaoEHE62ajir4d4pErFut13gIeBHX/MFAMMUsaQ8DxoPGP+o9YkUSSr5OSOkgA== X-Received: by 2002:a17:902:bf09:b0:153:99a6:55b8 with SMTP id bi9-20020a170902bf0900b0015399a655b8mr4114410plb.142.1651850832938; Fri, 06 May 2022 08:27:12 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id a3-20020a170902710300b0015e8d4eb22esm1879163pll.120.2022.05.06.08.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 08:27:12 -0700 (PDT) Date: Fri, 6 May 2022 08:27:11 -0700 From: Nathan Bossart To: Tom Lane Cc: Robert Haas , 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 Message-ID: <20220506152711.GA3404123@nathanxps13> References: <20220418225244.GA2387491@nathanxps13> <2395586.1650324834@sss.pgh.pa.us> <20220419001220.GA2389330@nathanxps13> <2470289.1650327424@sss.pgh.pa.us> <20220419154658.GA2487941@nathanxps13> <2886153.1651845462@sss.pgh.pa.us> <2890782.1651848201@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2890782.1651848201@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, May 06, 2022 at 10:43:21AM -0400, Tom Lane wrote: > Robert Haas writes: >> On Fri, May 6, 2022 at 9:57 AM Tom Lane wrote: >>> 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? > >> Well, if we think that, then we ought to remove the NOT_USED code and >> all the random _PG_fini() stuff that's still floating around. > > I think that's exactly what we should do, if it bugs you that stuff > is just sitting there. I see no prospect that we'll ever make it > work, because the question of unhooking from hooks is just the tip > of the iceberg. As an example, what should happen with any custom > GUCs the module has defined? Dropping their values might not be > very nice, but if we leave them around then the next LOAD (if any) > will see a conflict. Another fun question is whether it's ever > safe to unload a module that was preloaded by the postmaster. > > In short, this seems like a can of very wriggly worms, with not > a lot of benefit that would ensue from opening it. +1, I'll put together a new patch set. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com