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 1nodi2-0006BD-2M for pgsql-hackers@arkaria.postgresql.org; Wed, 11 May 2022 04:12:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nodi0-0003ZM-MP for pgsql-hackers@arkaria.postgresql.org; Wed, 11 May 2022 04:12:20 +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 1nodi0-0003ZC-1a for pgsql-hackers@lists.postgresql.org; Wed, 11 May 2022 04:12:20 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nodhw-0006Qy-Aq for pgsql-hackers@lists.postgresql.org; Wed, 11 May 2022 04:12:19 +0000 Received: by mail-pg1-x532.google.com with SMTP id s16so734040pgs.3 for ; Tue, 10 May 2022 21:12:16 -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=i2+Ce09xJRcIufEHJQp9XG9laEJ9IifcMtLvDltQCfM=; b=mYvRGfL6qu9hZiFxMOMUjvwJuhbHePsg65FGucoDG5CeK1QPds+s6PCeYaxUbLX+Fy qwfMlYrpppbqmOpWEB6j3kbNTeRRcRO9oT2GJes/zH94qVU68A8gI9FF5V5ziSPvsdf4 V35kwcWzs6/frNe4l+Iez245tmp82DE5QFfhbTwtJz9R4bpX44y7nT53gp7APPEOAA17 QJrJ2X2F3pMQassZUOacKf3bdDiLRIQDAXCkQW/lAh4cmOsFw4l+0h3Lfjwen8OAIZIe uNvH3m7UtS+onXwHzehHgfy+Ck0hW5qeFfP3KOjuY7AKUSMDhc3scqnhJu/cMSGcnfcN 5syQ== 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=i2+Ce09xJRcIufEHJQp9XG9laEJ9IifcMtLvDltQCfM=; b=e2nXlcoAoi09hREKNRxBoOwHycSpOwxC3cViot6Pe6MSHoQNlue2ln9PX3s9MbMoUZ kBG9lZ6ZR4h5zY9+kQdC7Y8RA4XPNbCGWkB8DEMyOO/4vKcHm2Y0KpWhAoTYy5HN5pX/ 7Ibdwk7eNIjpdLGDjYrv8j7USy0bAcpVndQJme6qu6+0QkO/LbegRU1vEf+BYfQZTScS tdlvAmY2NuEsMRman5KPcN5agKD92RJo0l62KQPoG59uXHC1Tn8YTbsq+1w8nqDjZXWD Hh1i3FP79SEkzWErpDhh+JzXaskZccfU3b4Y2buWpDVatLcav9jqlPWSI9oAiBmzxRr1 RlhA== X-Gm-Message-State: AOAM531ox/+udf8LDDVrImixWsMtcK1sWvpm8mcJMctW6bbB89cMHoFe WGZpnnsdm7QPVN7SLsi+OAM= X-Google-Smtp-Source: ABdhPJxn3j+GG73j7/kevxsbLiNQXN1/DaSzsrpyfaGw7uxBRoyfnJ3Oe69x6HXN2jwaqCvGWGuiQA== X-Received: by 2002:a05:6a00:170c:b0:510:865f:bf34 with SMTP id h12-20020a056a00170c00b00510865fbf34mr21340069pfc.60.1652242335158; Tue, 10 May 2022 21:12:15 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id u3-20020a170903108300b0015ee9bb2a38sm467697pld.72.2022.05.10.21.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 21:12:13 -0700 (PDT) Date: Tue, 10 May 2022 21:12:11 -0700 From: Nathan Bossart To: Michael Paquier 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: <20220511041211.GA3848903@nathanxps13> References: <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/mixed; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 11, 2022 at 11:18:29AM +0900, Michael Paquier wrote: > 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. I swapped 0001 and 0002 in v8. > 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 > from _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). Ah, good catch. I adjusted the docs as you suggested. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --wac7ysb48OaltWcw Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v8-0001-Remove-logic-for-unloading-dynamically-loaded-fil.patch"