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 1nobw4-0008Pp-PP for pgsql-hackers@arkaria.postgresql.org; Wed, 11 May 2022 02:18:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nobw3-0003MM-7L for pgsql-hackers@arkaria.postgresql.org; Wed, 11 May 2022 02:18:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nobw1-0003MD-Sl for pgsql-hackers@lists.postgresql.org; Wed, 11 May 2022 02:18:42 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nobvz-0005TR-2r for pgsql-hackers@lists.postgresql.org; Wed, 11 May 2022 02:18:40 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 5969C320093E; Tue, 10 May 2022 22:18:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 10 May 2022 22:18:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1652235515; x=1652321915; bh=To5/rRUIb5 rOr40C5h/voFXQNjmmi0IzrCKVMECf/9I=; b=o2E7rbSZgCIGEu/jm1b+TwlP0R FHF8+haESPYwHpC8YTGgcmVm+7pqyiUO0VEOkOtiz9h30IYX0ZdWfOipjyxAoGj3 z1tWRIg8nmEjK4Tz8YZPMlmacPcv9gbYyPn/3wqiKHxc0fDXcbPCdNnTnFrUVpDO fBi1rEe1AdbXW2jashnpfIzIbMwIzo877COfsPD7xLfPdd4qhCIvD+LSEj7qOCRn 136faqJRWQAyow7zxPMUysZWJmdfef5tzk6amWR1dqwB6XJUtJpPSxwrwx9UNLwu 6+x7/3P1lYIu+yl2mYkzbvAvZ/K3dGCdlVsksJMTb56W1oaQcCkcPkM5Fl0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1652235515; x= 1652321915; bh=To5/rRUIb5rOr40C5h/voFXQNjmmi0IzrCKVMECf/9I=; b=h fNzmYYrglJag5R8lMKiHY/fr4DNOL6rEix0a6dm0f769RxG7Xk7z0MqeH/s8u24O Wb2XSa+X8pAFEL4xgKs/1kS6tbL4jqs/SCrCMwWVE08D6Npzfvk2eeygOgFGS/hZ WiCSLtppFP1Ndw4cmeGUp1nwQQiEZOV1BCF7+ujvqBdtljW5z272fuzP7Ne3rNb+ cGZqJbk83giqB2rMzuo5KB6S+KE6Oh604ld5opIa3X2rzC9mkz+/COUoOfx+K2Ev ZFU9+h5b/hcd2Upv8jwFrMX7rfNGo6yVXcg56jR/4U93JWAS7FZRpkrPSSjCMuSj 53M/Nqd4+y//AI6ni+PyA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgeeggdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 May 2022 22:18:31 -0400 (EDT) Date: Wed, 11 May 2022 11:18:29 +0900 From: Michael Paquier To: Nathan Bossart Cc: Robert Haas , Tom Lane , Julien Rouhaud , Andres Freund , "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: References: <20220419154658.GA2487941@nathanxps13> <2886153.1651845462@sss.pgh.pa.us> <2890782.1651848201@sss.pgh.pa.us> <20220506152711.GA3404123@nathanxps13> <20220506211521.GA3666015@nathanxps13> <20220510155628.GA3671942@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xeD/6UIxU92tKjs+" Content-Disposition: inline In-Reply-To: <20220510155628.GA3671942@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xeD/6UIxU92tKjs+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 10, 2022 at 08:56:28AM -0700, Nathan Bossart wrote: > On Tue, May 10, 2022 at 05:55:12PM +0900, Michael Paquier wrote: >> I agree that removing support for the unloading part would be nice to >> clean up now on HEAD. Note that 0002 is missing the removal of one >> reference to _PG_fini in xfunc.sgml ( markup). >=20 > Oops, sorry about that. 0002 looks pretty good from here. If it were me, I would apply 0002 first to avoid the extra tweak in pg_stat_statements with _PG_fini in 0001. Regarding 0001, I have spotted an extra issue in the documentation. xfunc.sgml has a section called "Shared Memory and LWLocks" about the use of RequestNamedLWLockTranche() and RequestAddinShmemSpace() called =66rom _PG_init(), which would now be wrong as we'd need the hook. IMO, the docs should mention the registration of the hook in _PG_init(), the APIs involved, and should mention to look at pg_stat_statements.c for a code sample (we tend to avoid the addition of sample code in the docs lately as we habe no way to check their compilation automatically). Robert, are you planning to look at what's proposed and push these? FWIW, I am familiar enough with the problems at hand to do this in time for beta1 (aka by tomorrow to give it room in the buildfarm), but I don't want to step on your feet, either. -- Michael --xeD/6UIxU92tKjs+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmJ7HPUACgkQnvQgOdby QH0lARAAir0EfYqtv0Iv2eeTIPEkTUyY1eNAS0/I/NSspqM9GkQvKVPR19Ht5F4n KimwyHHA6kA0pTuSy1eGHq6KT8QPz8A1g2mWax/F4829pEYQIMpgO85P4e13QwQ3 p/9VfjYoQsalcs5mrYJpArKhTjfuJlg7dkPqNzrzIb1a3XToh+5wT26kSdgNVvNp bft7IDYJX5p4U03446lI2Ugx0oqDthgKt9aL90srdKUgQRWI1dh8LgtJi/hKP4S6 GVpvuHq/RpEUmNLHVIpb/5/QJyiNfYkPEbSf/O8ewDCUWU6zJo3iF9nfofOpA74D 0Mgd1RfxUqRtI7pA9FCeYCyTu0lyEXkqnaEK58bRAzQVh58x1TlPAG7X016Zk1KU CYg0cv7/c4K5uICkbxdbYXH125oYcCN59cZr6kRxyBiCO3+MisU+lDqrh1Wc09VI nZKi2c2NHxE8tT2Mn0DE8n5cvFqiRA+qU/+n05LBe68aRZlznR/69OEdnnM3eDUt nCG63w7a4FIclxVwQoB8oQxBsQD9ccLF+DdPPvL9sgF3o3x0msl2kmHMMIHEJBGc 9QKqLxNJFnMEJFj+VOCgxgHVe656ClsOCHGA5ToL/n4z7QJtz/YKLzCzd7JVO8rO cKsnOc9d6YjNRiQQnL0Z2BrDWphQz1CdFec4gVddXnS6Bm1FwG4= =5tct -----END PGP SIGNATURE----- --xeD/6UIxU92tKjs+--