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 1uqdsP-00AGwc-Py for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Aug 2025 20:33:15 +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 1uqdsO-00E1h7-RE for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Aug 2025 20:33:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uqdsO-00E1fj-Ei for pgsql-hackers@lists.postgresql.org; Mon, 25 Aug 2025 20:33:13 +0000 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uqdsM-001ioE-20 for pgsql-hackers@postgresql.org; Mon, 25 Aug 2025 20:33:12 +0000 Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-3ea779929b0so16938785ab.1 for ; Mon, 25 Aug 2025 13:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756153990; x=1756758790; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FRUIsL2JEgUnPrUNunF1s/Y8RUX/kZIF+ImBz/PLsVo=; b=SD6xxlk92/v/md3WL76s/FgHZVoGoSynMTvpQiKYlMkYBbmQsy6wMnA2CBQeXa1Z/t pwevcMzkw1MOX4a9P03VoJ3kIMFzYQcI2Jqg2NgAbEbueKUmKzrTD0nsbVX4aYCTRTKf 3K65m7slH48kanpccTzvSAe1XH+Gpki5gFPViaH+i4FxwJc0xuRnXbg5JlSJ+WS+UMvp oNGYDFjvJuOLJQoenVGFBAm/TODxgrsEVQ3gNhDkYscE3TL3XVBYK887GOUK5kUzjBQu TDdc5yNLCkWwxt0LUkjhZTxmIfUpSZroouPqxd1leREGKwH4RHCsWKsV4Ow3vWWNPx+2 UZRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756153990; x=1756758790; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FRUIsL2JEgUnPrUNunF1s/Y8RUX/kZIF+ImBz/PLsVo=; b=dgo7E/ZbbDFgVaOL6QBrPkHuWcvT/sn0o8RonK/23B/t3n3qSRl0+HDB/bg2HIHO6s ubdYqEPfs01Hmxet8RmH6NWFW9T5RKEiKhYT8yCgMmWgDNutqreZqUot1FKAyqM1XsVs DuGWvsFzXJmAkh2NS5I2bEO038yAu0izA2fhUwXlPKu8TQze4Al60P8G3Rs5U8ogoG77 TRfAaNxwTmL1xkmd4RIrWbFAWvX8mEhgaQfNYhbxgS5kN15VTIu1WtBvzuGb47mou6kj 8fBOkPK89hWlY3FEX0OVdcOeQPjRUR3DP4B7C3QG0Zuv4Tgqby1gNMXTMGnnLIhlkZFI dQKQ== X-Forwarded-Encrypted: i=1; AJvYcCVizGbtu/1UY97Kh3zDFq/+Mq72iBr9VrxjGkjdF4q0EotrX/LoufQ2LOmwkxSOsx6Ldh17OSYd9UJBlX9s@postgresql.org X-Gm-Message-State: AOJu0Yyg43XqADvYSG35D5BmYhtJnzMXkApnUCd6o4VIzBySKjE5dx3y epZx37LIfrUi1U7xXIbGNROFBT+w+cJofhNshGYYVNm64I2wyc+XDC1r X-Gm-Gg: ASbGncufbkm54TWnBtb3FMmuW0pn5rxlSjRQbBTTaES06gnP5rtGWOjwtJ2Yu2u881s kDtYaxz+44/FBBtAmwrCDEgvOkeql4WVuLvdttlPr+aP31K0mWAnc/JhOggWpC2nZae4kSI+Wmp V7iWHjSoWP3F5u4N8oAQcneRCviTRuhY416pp3+IPjaYJmH7E+KjWayYcIHm2LOXfeg5Uyeb8f7 y4omPBOIt/3snL1TF/LrM8WMAtqXF7EEJrQE36EkoEQqYLUQzsgkN5UbCXE04qWFHZD+ZbHKYGc he6rjDS8rF5u73s05wunlVwHrTqtA1dJqHtd7mGRYVy1+oXni5HG+sdzyVIjqr4TSPDvbsEgQNG 0Iad9jATRFgdJA1vthLGzEoXnhc+FBrmmp4Duul8z5Rjw5gHeg1+gMZFbq630ej2wA2IhgOYLs5 dyb/7XhxzDpsbW X-Google-Smtp-Source: AGHT+IEkovjX9UM9VYQEYdxfcvqkaIcyY2daWtf049vtV/i3XbFqiwFK1g60MY6pL59yPMjlZyCp8Q== X-Received: by 2002:a05:6e02:2144:b0:3ee:a3ff:96c4 with SMTP id e9e14a558f8ab-3eea3ff982fmr418785ab.0.1756153990572; Mon, 25 Aug 2025 13:33:10 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3eb18693d2esm43913385ab.42.2025.08.25.13.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Aug 2025 13:33:09 -0700 (PDT) Date: Mon, 25 Aug 2025 15:33:08 -0500 From: Nathan Bossart To: Tom Lane Cc: Sami Imseih , Andres Freund , Bertrand Drouvot , Rahila Syed , pgsql-hackers Subject: Re: Improve LWLock tranche name visibility across backends Message-ID: References: <5to6tftuml6nkas4jaaljfzecasvslxq3mumeslh74wsol4mzw@rgxpxxlqqwtf> <876523.1755635201@sss.pgh.pa.us> <2151672.1755898435@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2151672.1755898435@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Aug 22, 2025 at 05:33:55PM -0400, Tom Lane wrote: > Sami Imseih writes: >> One point I did not make earlier is that the tranche name lengths will >> need to be as long as we allow in dsm_registry.c. > >> #define DSMR_NAME_LEN 128 > > Huh. Why is that different from NAMEDATALEN in the first place? One of the reviewers of commit fe07100 requested it [0]. At the time, there was no reason to use NAMEDATALEN. I'm fine with lowering it if needed for the shared tranche name work. Presently, we also append a " DSA" suffix to the DSA tranche name in GetNamedDSHash(). I was originally trying to use separate tranches for the DSA and the dshash table for observability purposes, but since it seems to be more trouble than it's worth, perhaps we should only allocate one tranche. [0] https://postgr.es/m/58DB9EB7-4646-4508-84BA-F0F067A7E8BA%40gmail.com -- nathan