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 1ubiyJ-004RTD-3R for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Jul 2025 16:57:39 +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 1ubiyH-003cep-6L for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Jul 2025 16:57:37 +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 1ubiyG-003ceD-Sh for pgsql-hackers@lists.postgresql.org; Tue, 15 Jul 2025 16:57:37 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ubiyF-007uSK-19 for pgsql-hackers@postgresql.org; Tue, 15 Jul 2025 16:57:37 +0000 Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-3d948ce7d9dso37285945ab.2 for ; Tue, 15 Jul 2025 09:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752598653; x=1753203453; 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=pxapR9fTSKlLmQKdd016twrdzozxMiKnu14UXWUUZIY=; b=W9dQlnQEvunaaqVpjush1eKjRQauqclqgDkQ8ve9r05siTrMkN2jFB4JGhUT7JyrbJ LpfJ650bpr5jRH2p6MaSoGuizVdJblYrQSIqRLGxBmmAgeZj3JY4t/oWfBGDzcA+VECz OZ0eXkg8ECLKTdVL38SV3G2VE4pAcwFxdp+oafEnLj9E2eZg08BdkXHLPxpxqSWuahPW CxSvSwji/yVNCIrBOsPFClD9KJPYq3mc4HeUP1AzBhu/P3K5XXPFDvthCk7wK4ueA+vF TsZ/wo/9EYiFjYiGx58YIneziys4GjlfM3R4XwubpmeQ9yzKdsW8AIXO7MtWuVDp8aKU 25Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752598653; x=1753203453; 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=pxapR9fTSKlLmQKdd016twrdzozxMiKnu14UXWUUZIY=; b=QBJtDZIyWOG4AY6D71mjsCIYwXF7VuSbqov191hAI+PAewzoeNpvKQcGDuIXKU6ziD GjmUMP9D751suL1dvpswA/w13oNMtRJiBGdl8tBhlCv+gj5lyNNsem4uwinqIxJBK8FM /YVC78co4zow8S8TY06ewxv1Yzoz4SLBPpaMK4xpcfj4dMLyevHsE4qkPViToPdSdFLZ 3CdA8ObwIvZyEKYTa7fQROkrPK4nhX8mc7k9s+al0+B1oou4KjBLvAiP5HaNHJKlkHUr ehCdMjQR05Fugz6d7HGJY9RCbdNfSf1uqONEpVpN8pV92QLMZrFwU9Y5X4RbYV2/7sSl 1fZw== X-Forwarded-Encrypted: i=1; AJvYcCWWdF1ewD19k4NVM73CI6Ct1KL797KTpf/EmvYRbcpFHDD6y4oC71SflThbVABDd1Xp4ZvfM7oN2cyFBXdz@postgresql.org X-Gm-Message-State: AOJu0YxvdhH7IF/ajcNkh8e1PBVNxNKAGOF2tIznXIA9PrZ9e2S0/YKj e3+n3mUjKuQ8AHTLzfIIeaZ22JMTm53oiU4icymb1ReB+MPMQArd+oAu X-Gm-Gg: ASbGnct4MVf/kiuKS0SSGt0s7+XYIIFNgDxvoT/ttJf3AuWE7KWGG8iNrQOTNIYOB1A QkqhFB9TY4MR6dfmBTCCkFtgm5vDKrP1zVLQt9r1hbo39X4MXJfAi8GPXYVbCruMIIgXnRHV8zV rUeQOUAU7R1uTMceF8WJB4KDsEwJZ6Z6YuqXwCZjKYSgtnnxaQoZw0+RJVR1t9HZ1DN0RZNY6kP uxJFdT39SwmKO9BBv7q9LhPUmKrlJeVjDsq8KA+QgLPtQ7O2jqM9ZNDLcGx5Ao4bOmceospYyB5 rpEf6he7uupOCIKVqlnRe+DUuQ25oXVJLWIWcu+VxUPdmJpE4r2qB+NfwOHdBENyVBeonMQmWgk IE6mBuiEPpivLS7wJzW+iNk+M66+GQmo0x3s5Ys1NRXkLOzysVrcdjaqILHLoHhFjeNk3Gcrs+7 oHCx1gB5t3VC52cIGZTS+/B1E= X-Google-Smtp-Source: AGHT+IF38UiiUQLez5YGgGYmRmVgr5BmhOf0aCCAWlpTw/E8op8EYPYHrZ3sEvQ2TiteEi8jtY722w== X-Received: by 2002:a05:6e02:3809:b0:3df:52fc:42ea with SMTP id e9e14a558f8ab-3e2542faf08mr132200785ab.13.1752598653080; Tue, 15 Jul 2025 09:57:33 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-505569734b7sm2631959173.87.2025.07.15.09.57.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jul 2025 09:57:32 -0700 (PDT) Date: Tue, 15 Jul 2025 11:57:31 -0500 From: Nathan Bossart To: Sami Imseih Cc: Bertrand Drouvot , pgsql-hackers Subject: Re: Improve LWLock tranche name visibility across backends Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 15, 2025 at 11:52:19AM -0500, Sami Imseih wrote: >> Another random thought: I worry that the dshash approach might be quite a >> bit slower, and IIUC we just need to map an integer to a string. Maybe we >> should just use a DSA for LWLockTrancheNames. IOW we'd leave it as a char** >> but put it in shared memory. > > To use DSA just for this purpose, we would need to maintain an array of > dsa_pointers that reference the string(s), right? I am not clear what you > mean by using dsa to put the char** I was imagining putting the array in one big DSA allocation instead of carting around a pointer for each tranche name. (Sorry, I realize I am hand-waving over some of the details.) -- nathan