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 1uoSuw-004NT0-Mm for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2025 20:26:52 +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 1uoSuw-00GoTc-0t for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2025 20:26:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uoSuv-00GoTT-Ng for pgsql-hackers@lists.postgresql.org; Tue, 19 Aug 2025 20:26:50 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uoSuu-000mIK-0K for pgsql-hackers@postgresql.org; Tue, 19 Aug 2025 20:26:50 +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 57JKQfOr876524; Tue, 19 Aug 2025 16:26:41 -0400 From: Tom Lane To: Nathan Bossart cc: Andres Freund , Bertrand Drouvot , Sami Imseih , Rahila Syed , pgsql-hackers Subject: Re: Improve LWLock tranche name visibility across backends In-reply-to: References: <34drxi6kshtzu5aerftjflrm6wfxxw54emyvy4gqemdpxxuhvm@gymw6its72o7> <5to6tftuml6nkas4jaaljfzecasvslxq3mumeslh74wsol4mzw@rgxpxxlqqwtf> Comments: In-reply-to Nathan Bossart message dated "Tue, 19 Aug 2025 13:44:39 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <876522.1755635201.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 19 Aug 2025 16:26:41 -0400 Message-ID: <876523.1755635201@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Tue, Aug 19, 2025 at 02:37:19PM -0400, Andres Freund wrote: >> Sure, but we don't need to support a large number of tranches. Just mak= e it, >> idk, 128 entries long. Adding a dynamically allocated dsm to every serv= er >> seems like a waste - ever shared mapping makes fork / exit slower... > The other issue is that there's presently no limit on the length of a > tranche name registered via LWLockRegisterTranche(). Life would become > much simpler if we're willing to put a limit on both that and the number= of > tranches, but thus far we've been trying to avoid it. I can hardly imagine a reason why it wouldn't be okay to limit the lengths of tranche names. But especially so if an unlimited length causes practical problems. regards, tom lane