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 1vOMx2-004kvu-0L for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Nov 2025 21:21:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vOMwz-001jKO-2N for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Nov 2025 21:21:22 +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 1vOMwz-001jKG-1P for pgsql-hackers@lists.postgresql.org; Wed, 26 Nov 2025 21:21:21 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vOMwv-001flw-32 for pgsql-hackers@lists.postgresql.org; Wed, 26 Nov 2025 21:21:19 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-949325df6c8so12079839f.1 for ; Wed, 26 Nov 2025 13:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764192075; x=1764796875; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=mCdBnd1G0AaBwtsrv1bzaJ13lszMUW+TrG6HWabzK9c=; b=Ml1I7/mFzydLMxxCQFLR0HN39ZkQ4yXJoHJsTnGn6q8DxFJI7nFRqaz9T+6t3csVF6 T5LtmcDnut9yU4rk3xQNHRQyfaB5R3wZpgjLbWYtlydp/yyu5yFP89NbqPoZOWUoRuJK FRJUvq9oIXxoV5mnG3IvkQXj3a+G0qOAOzbTSXicQrl8gsl96+guGycPvfNjo2YyphM+ d6srbmJXnYCzsyFjrlxN+t+72qCDNOaOnUWGPGKc3TheOjRElUgI4dXUs5eNwNIEvh91 LqJv2u38+xtaOd+sMnUWxMCwY7okAlcZKmc+dREORN6bZPJqfAn1GZCxT+/oFSsvaS8u eOZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764192075; x=1764796875; h=in-reply-to:content-transfer-encoding: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=mCdBnd1G0AaBwtsrv1bzaJ13lszMUW+TrG6HWabzK9c=; b=aoJTGBO3KO0ytiCW0Tu3cuXIRxshOo+F4GkY6bJk7LFGoCA2i/Hjwur27mBh2p0EEr DYTcmnIPWboY96/b9wLS3aq0yu5CA/IbDw+mqj05l5cnt9VPUhHW7SOZ9ipxPQZQoWjM coY+A44DHfJWJMLU2oELuQijMyjXWD4g8cgHcDD0J/eT6l423FucQNdSJhvx+X4mQ3n7 iWLC6AroHAYfTvqLoJ48sd48EluseuKtTvSSpLeCPG/99AxHmnuHURxTNKsjHLpSFGtr 6GULqzvvidEj/SX08jTFjZUyNSkgUrCfugWB7t6rAskWeCUVFLehFSKNRzKzgf56PL6w 95jw== X-Gm-Message-State: AOJu0YxxbI+jtlddSgqileR3L+MLB68zs+u7ZDAtCxRBuaTSTAluIlnF 5tU7DmFOb+SFHYvx/fG3OAYM9zB0k7nNFDXsMXZEQ7M7oOjBAJ9GZKbX X-Gm-Gg: ASbGnctNW0P6qurqiaWHB+iWB9vWpydfbJJ+fNopv8oPRwKY7cUG9kbIEGxntEruKAC KGfZGugQRdwzRTP0q8C2xfqic/i9MTZidKRLyzrwv9I/3VDU3MPE19Jc/685L3lFEwhEAKcL47V KN9zHDLOmyVCr6AhNVq34npSBMpbVkMaKdJ2PHE+wWW9L3x6+wy8leBj5xQtXDe5idcB1HSbtsw +X9ldiAfvCwtVdCwoX59eaTW6+AjfyOgeGweyC8ov9mzKKGjtBRnjRiBpniuiTvjnuQEm/9VgsG XgjfGmYm+G6UqsIfPSvHMLqwl0SchuncHX9ePgjga8WYW2bqQBX2PTP3aSvpLyhJ7vmp/mEVbbb fOTPlWyu4wnpkM6PdIIUvpLyU9CLuaH9TJ98CDV/I7TiWDf/uPisxU1WO0CYzTnAKVRSoDNx40a ubyoYUyWFY28dSr96FbIoUESB7XbYCBELHIbxlC4KVY3Ar+vyyh2rRjZmBV9Hta3B0XprpcEW5k /xo X-Google-Smtp-Source: AGHT+IHS0HpBl5CD7586JSBT08KjjI5AfaWHn4OMGQU3SeXBruZUVQtWMfQ4cpGPQgQqzVMKh3IUTA== X-Received: by 2002:a05:6602:6b88:b0:943:58c1:a083 with SMTP id ca18e2360f4ac-94948925204mr1778088139f.7.1764192075217; Wed, 26 Nov 2025 13:21:15 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5b954a44d3fsm8630172173.21.2025.11.26.13.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 13:21:14 -0800 (PST) Date: Wed, 26 Nov 2025 15:21:13 -0600 From: Nathan Bossart To: Robert Haas Cc: PostgreSQL Hackers Subject: Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Nov 25, 2025 at 07:13:03PM -0500, Robert Haas wrote: > On Tue, Nov 25, 2025 at 4:16 PM Nathan Bossart wrote: >> My tests seem happy, so I will plan on committing these patches tomorrow. >> The only difference in v4 is that pg_get_dsm_registry_allocations() will no >> longer show partially-initialized entries. I thought that was the best >> option in this case because such entries shouldn't have any allocated >> memory, and retrying GetNamed*() would set *found to false. > > Without actually opening the new patch files, that seems OK to me. I > think the important thing about such a view is that it shouldn't make > any state changes; it should just show how things are. In my ideal > world, it would probably show partially-initialized entires in some > distinguishable way, like with a null size. But leaving them out is > also defensible. The thing that I think really matters for failure > cases is the ability to retry whatever's gone wrong, either to get it > fixed or to see the error, and the other changes already accomplish > that goal, so I'm happy. Committed, thanks for reviewing. -- nathan