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 1uo7cM-00GbhF-SY for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Aug 2025 21:42:16 +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 1uo7cM-002a2o-71 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Aug 2025 21:42:14 +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 1uo7cL-002a2g-UA for pgsql-hackers@lists.postgresql.org; Mon, 18 Aug 2025 21:42:14 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uo7cK-000XL9-0l for pgsql-hackers@postgresql.org; Mon, 18 Aug 2025 21:42:13 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3e57003ee3fso24591695ab.2 for ; Mon, 18 Aug 2025 14:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755553332; x=1756158132; 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=QHcu9AFnuVHYbAnFYRRL6qxtF/Wzy+W8F7ElJdylI5g=; b=I/p109m5M2nut/ud49qQJilVC977m44tVzejMg7rwujNx8oy7v0Xe7/5nlOawxz6Wz HPBRTahe7/q42Rs9Uv64teOxj/4ULnoST0Zbe6gOMnOFUkshmnsQq7MmywScZkNGo7iu gs7gi4s4HVC0f4wBCaKYGmlKnL7MHGJp6vKy8ZZ42HdD8O4++d32kbv7/L/cMuScHsJA VcEAX5O1q6/yPdJcK/hQc4fFG6Igq73pZUhv1fEdNw9L0yOQHRwXr5Db3OpJxJLSD8jW AcNa9PqKTcgGtDBp+logy3HUgBg/U6uWD6ldLxFVKDC+QVAAY0pO1Xr/ovsZ2ReKx/OU rKzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755553332; x=1756158132; 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=QHcu9AFnuVHYbAnFYRRL6qxtF/Wzy+W8F7ElJdylI5g=; b=QMJ8Tw+VxzIMtr2IGe6JsqSwFhoIf2ijkoSuaTb+Z2cPS4xXqk7qjn1LkKYJ2LU9WG /66QZLnq91ZzH+SnMNp+44KRUQt2vaNrdzSyf8NpYGl8UfDLJm+eSo8BuyahN7os1vG1 iZfSnk/mAtRDwQC4wbYIfeljaEtsrWJqDpQwxlehkMeXQrFxg/TIFlBKhNTdtAbLeQPQ 230+WG8Nz1GdJ0VBudfMxSIsRqsPMP25xyAlwbOTMLuL296ScnlHUvhnRe3Om3MucZQE asL+BbH72FL0shZqbxpBSpk2MOw7ncrrQe2vRChbcYZ1JiXR5/i9cgKqeaFN4bF88hmk lFjA== X-Forwarded-Encrypted: i=1; AJvYcCV2T0XdwNGWHXxWbSk7wFoHIAIADYh88I+3I4xHy1/0m79HrscFZBi4H7JhTvrFE9jGg81cMw2608Tgc7yd@postgresql.org X-Gm-Message-State: AOJu0YxpWjMQJK6gycwHcRkRVS1vKIzaflMJz19Maa9V2GKCpeVpnDNR s6U9N3oV2B/X7mEJ+/QQMAi0goK03kUKly/6juOpN4cHCq7z/DBPwI5z X-Gm-Gg: ASbGncudI2bRIjzj27AMyVkK8VQpMKNGEX6DdB1JXtgwmM+1dErdnaYY0Sw5gOHturq jd3rOrBIhZu00ultyGmXZEOXeDkwKKO9sJ/C9DMhyzFCJzEL886N9hbZoJ/jzgC5stT4nz7EYUO Ztyh8bI/InGVBgrKGOZ0akSR8G1Ws22JkWwwTMEz6l2+5tQnhqnTP41kABiVazJhDRH6rSOyDlc TDjIJo927ubUU313ZJZj+2VFSKpM5Ezso3ts3CViwPV8UU5fGS0e79JA3Yl1yd0CxjadkF+CBme X2jrDThOAzcAY87cre8JBFESeNp0Gsy5CJA/ZFCbM1U92lT7WE+7ZGP3MRaJEtLYhfIWjh8wxf+ 1Xx7aNGUtfDmLXLDbVCJb+KScVQVonLbxjb6/6Hps3LghfPL4ysUY4T8kC0Frm7KUROztafDuv4 /0zsnumBbF1OVY X-Google-Smtp-Source: AGHT+IHTKOTE5NWCNIa4CNDVRFcfwVxTuRqArxWdHKnTGEbWbPgWuMTIGU0hn54+KUNd8XEhowzWsw== X-Received: by 2002:a05:6e02:1a6d:b0:3e5:58d7:98f6 with SMTP id e9e14a558f8ab-3e676634b3bmr4666235ab.14.1755553331735; Mon, 18 Aug 2025 14:42:11 -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-3e57e58c1basm38859365ab.5.2025.08.18.14.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Aug 2025 14:42:11 -0700 (PDT) Date: Mon, 18 Aug 2025 16:42:09 -0500 From: Nathan Bossart To: Sami Imseih Cc: Bertrand Drouvot , Rahila Syed , 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 Mon, Aug 18, 2025 at 01:06:42PM -0500, Sami Imseih wrote: > Attached is v10, I've been staring at the latest patch for a bit, and I'm a bit concerned at how much complexity it adds. I think it's a good idea to keep a local array of tranche names indexed by tranche ID, but the code for managing the list of DSA pointers scares me. I know we were trying to avoid using dshash earlier, if for no other reason than it's perhaps not the best data structure for the job, but ISTM we'd eliminate a lot of complexity if we offloaded the shmem pieces to a dshash table (or some other shmem-based data structure we have yet to introduce, like a dslist/dsarray). WDYT? -- nathan