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.96) (envelope-from ) id 1vQTHw-008Iln-2X for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Dec 2025 16:31:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vQTHv-0093gJ-2q for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Dec 2025 16:31:40 +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.96) (envelope-from ) id 1vQTHv-0093fz-1t for pgsql-hackers@lists.postgresql.org; Tue, 02 Dec 2025 16:31:39 +0000 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vQTHu-002lYY-0V for pgsql-hackers@lists.postgresql.org; Tue, 02 Dec 2025 16:31:39 +0000 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-3e80c483a13so2540754fac.2 for ; Tue, 02 Dec 2025 08:31:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764693096; x=1765297896; darn=lists.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=fz2qRkIstxnOhvG8rLWoRNjuS0O/cNxWe/dcVARUqPM=; b=DTuS6HQRoI8zDcQawpddlsjAW713Keo2iI7tKFaqGpudfIFBKZo76K690NA6/kCJbb GFT4tuMuUOCAztJIekq4HvS5svIfM3iWJrjYkLZYZtoBRXVIJB1mR3GepguOsvZu7KxY 2vqdQ8bMi6FuDiEl3sq9lyuvIWsoxeD+fwWsFyDecJC+Wy9eEZQ291XwC83cU3IVFss4 ad/BXLDLpxuw6jh813ZRvMyHS0xSbsYRa58PVgOST+8sHLwy0m5nGXP4wqC+7HtjO6N0 14FvaTzTuHyIpk3NBUqsegijZjOuz+61BeUMB3GoEZqfeFQPVTbbeFLFxuUUWP0FoGNa 1H3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764693096; x=1765297896; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fz2qRkIstxnOhvG8rLWoRNjuS0O/cNxWe/dcVARUqPM=; b=qUFcLMdORD1Khz6dGLLLSiqqXJ6hBp38TYAH5rOOYhXL+nLuxhxZVW1Wq9AvtprxX4 c11gPnv/iez3CJWiW9dtmhFJ8XkN6DVabh5F6LN3HSEwXCwVgnI74dIJT0lB0QUJzHf3 DaEAUFvN3SdfQxIVPrNerH3RTiFJT8mKCfbUOVhu9LQ7BczOpPIvkm0j4IKc2YrDuPzl OsIn1NjBHPgHh0uEDfG/j/hjleDuKwo2qqi2on4r2ujKPY/mRVDsIPqTSc7w9POnbHm3 uFaOjptBZ0q5uuHhcMI4/Sy8D4WcHE65+UhG6cF7LxY4b1v7bMCUdx4sGP7Td81WElir q19g== X-Forwarded-Encrypted: i=1; AJvYcCX1cndo60XlcEcezGYos4YHZn1PyJqRu1CyPtEN58MZL5JQLnzP+FgNfnzuLJzOzYsRc2UY0tSPfcrTSvgz@lists.postgresql.org X-Gm-Message-State: AOJu0YxhiQyCHZxc+TpJLCUXYZ/K1S499Hw3HgEge4AcZE74dhWkE7hD o/7HqmxWF9mQ5yzNElC9KJEhMOwJ0WPXW4HqzW2uKwVUkXYHywE24tbt X-Gm-Gg: ASbGncuh//DpTcsI1ZqSO5STx0w7+cY0dqnnjXcTimVrw25n3k47Q39Zs3HKBWHoznn 6vaIOx+itzgx6RxHKPv4wKy08Em3qXImoStLzdNzv8Y5UDV6oG556PMtHvkk2/yOQBe9sYwOdFR l5dzl1xSJW0uskvtTgvCMmUW4dVyKSzPjAVQSeBOeCSj0avnqEHVJFGX7403cncpvOC11EVt4jS 9qyrd4LSERRmnK6Q8IZjjoXxUKiAt6fH+fJjyO/JbwJ4JcipuHt7EwwG3kSAGM3cj+X7ltY0Y02 pPwk8trg8vf1NrZ6BQEFU+8po+AiDVUfi81XcZqGFwXT02v67hwY+RalIJ6MyIOyhniBA6CaMRY yJuhUjP+6kpsyofKp5BTwF44s3bPu/ow7k7tb1o7sSgDocmD1ye23wmaIiSXVLvmd//GRP06b76 rZYuwNaUUR9kGqK4MhVoL4J+fGu+B0+6+rCwmxM1aUwsNKIg8bwDJw6rQeWXAsnzI30Mjq4ehvj RQ8 X-Google-Smtp-Source: AGHT+IFKy7Lt1gXeenzo9eqDwcRMB87i6pexl/JEFFR71ARNTYxkd++q1hPhUn8YVifVO6YHN7bqPA== X-Received: by 2002:a05:6871:4419:b0:3ec:3fe0:4e36 with SMTP id 586e51a60fabf-3f162e6caf0mr119073fac.6.1764693095993; Tue, 02 Dec 2025 08:31:35 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-3f0dc766dc3sm7978701fac.0.2025.12.02.08.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Dec 2025 08:31:35 -0800 (PST) Date: Tue, 2 Dec 2025 10:31:33 -0600 From: Nathan Bossart To: Rahila Syed Cc: Robert Haas , PostgreSQL Hackers Subject: Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations 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, Dec 02, 2025 at 02:28:29PM +0530, Rahila Syed wrote: > Thank you for highlighting the discussions. I'm unsure about the best > approach here, but I think it would be safe to stay consistent with the > rest of the code in dsa.c, especially since it's unclear that the use of > LW_EXCLUSIVE for reading values in dsa is a mistake. Okay. I switched to LW_EXCLUSIVE and will consider starting a new thread to use LW_SHARED when possible in dsa.c. > Sorry for the confusion, I am trying to say that we can change the > following comment > > + *The area must have > + * been created with dsa_create (not dsa_create_in_place). > > to say this: > > "The area must have been created using dsm_segments" > > Since, this function can report the size of an area created with > dsa_create_in_place too, as long as the area is created using > dsm_segments. It cannot report the size of in-place areas, at least not without some changes, because (AFAICT) there's no way to get a dsa_handle for an in-place segment. I've now committed the patch. Thanks everyone for reviewing! -- nathan