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 1vMtUD-0052xU-1A for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Nov 2025 19:41:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vMtUA-00CQ9t-0f for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Nov 2025 19:41:30 +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 1vMtU9-00CQ9l-2j for pgsql-hackers@lists.postgresql.org; Sat, 22 Nov 2025 19:41:30 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vMtU7-000wIP-28 for pgsql-hackers@lists.postgresql.org; Sat, 22 Nov 2025 19:41:29 +0000 Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-4330e912c51so14063005ab.3 for ; Sat, 22 Nov 2025 11:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763840484; x=1764445284; 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=qcc+wHuwsirDS/TMfXIlcuBEdyNNO3Z1jb5TxMKYTwA=; b=dHfmTSmsSOQTsmvDyz0xRL5Xb9g7v6alEoTBrQgmG55KV6q9+BeoXlC+MsyDviyyYU /ffuOOOXgV/WLzh81Fe6t7WAZFPKELfWZCbNMTO9ckpmJgExsjX7b2FhrXx4zLD57N5j BzLjABDPfuQvccfs7BTE+XI3dRhFKnLm/dpVYX2cfH98yVFdU7KsjuF6FNiZKGaFaPJQ ko0ZJtC2TMZFTjtTAGKY1iqy5UG5ZWtVRpy63xYowBOEJJpnNZM5wOecOpekUtP9DA7X kGvFuwECf7QL+yVBSGuLF2ZlVAoLfeGS3HcUf+N6EhcQ3tgLqrpT3fKH8q7dwNRxz1ko HCGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763840484; x=1764445284; 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=qcc+wHuwsirDS/TMfXIlcuBEdyNNO3Z1jb5TxMKYTwA=; b=KiaB2vkPRuzc1HNWSRbo22FaPKSX19n3siB5frpsTMQAqJtdahGWeOkCO/1sBa6aoL 9PdEtyGG/tHeEwlMRLka5u5JORv2eGuV5MhF3Pj5Y8JwVMc2jRKSz8BKVKc/xl24ujfe yAvUxDHcExIkcJp8BMSRz0QvNfeKTQjnu0wQDXuDaW3oMRvUPNZEcu96EkbxWsnIE3Dt 5UoqQ1c4AhX4BqckVgs97WerXd6HW8RfyUAr47B00cXQDeNgesFvhS0mg401QXWG23v6 ipzGKQJS70G+r8ln+m5/qwOpp3iH+98vp5mointCf3Q5LHrS8OZH5xweqrAlBoeMpKcO vs3g== X-Forwarded-Encrypted: i=1; AJvYcCV2m7h7EwUq31JhyOVHZgV9GJpQDdPiu7jz9/2wOtXZfOW313UIOhrQ6fXdCNZUkPfxFPY6gyaTCIDm4020@lists.postgresql.org X-Gm-Message-State: AOJu0YwJInx0A33mXEXjYNgp7MVyJ4UxMHA9R0h1H2jvdfFfa7hBechx ylPpgBguvVtc4WDTW9ffbJ22A1sWN8MH33s4PkPs2hR6UXscZQO6V/4z X-Gm-Gg: ASbGncveW9LGKGDYMEtp3bQ+iMAb1aOnV9VjIn3QN4MS3eyjHaMz/Kq+7HDFFNfBrXN ix2Th73ceon+ZWkZtWHKVQTF7CExLC0CiyvzBSeoXp7G3Z8Mr5gVcHhiMVnzCfifoAz8fpsnTku nNrswOUTUoegjLfbBc8njYohkmh8KPWcwC7TF9MgWJjebx7MQUGMXh/inZT3dmPfaaRYJbedOYt PoX/ekMr/s0F3Zei3bDrOCqYCxKF6qs0tIJyEtOUu7x0ovBHSOHSw5iVgyGyY8gUG61UwlrlChY +fXxOTIzDoPbLKLxLN1e/VP6z7A5+y5jP3lQ5JKif2mpEAVMOBdoWlgn2iCTNPLvyA0qfL77vLH h4Xlbp6pd7J/dYwkSmn5LwYZmV80vK+Mefk9juHQBbQ7D08535rh6pJ7y5cA7NeYU/xpQVD1gAG qShsM6+hkDbwW6PYQW+ekilUV2GL6Yaq+uA+9lR/v0sx3Z9SYEYfRZyG1cvEZzZ/pRkyH1l1Iyw QWP0IpGGSuBTfA= X-Google-Smtp-Source: AGHT+IFUnCyj9MVvGtX65AFGM7YoIHa+45c74/+0rknmpF587S5eFbcemXzWdBj6hEfR6APRk0vHTA== X-Received: by 2002:a05:6e02:18ca:b0:434:96ea:ff78 with SMTP id e9e14a558f8ab-435b8e91dfamr51204765ab.40.1763840484044; Sat, 22 Nov 2025 11:41:24 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-435a90c66b2sm37653055ab.16.2025.11.22.11.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Nov 2025 11:41:23 -0800 (PST) Date: Sat, 22 Nov 2025 13:41:21 -0600 From: Nathan Bossart To: Robert Haas Cc: Nathan Bossart , 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 Sat, Nov 22, 2025 at 10:25:48AM -0500, Robert Haas wrote: > On Thu, Nov 20, 2025 at 6:09 PM Nathan Bossart wrote: >> Unpinning/detaching the segment/DSA/dshash table and deleting the DSM >> registry entry in a PG_CATCH block scares me a little, but it might be >> doable. > > It seems a bit weird to be doing explicit unpinning in a PG_CATCH > block. Ideally you'd want to postpone the pinning until initialization > has succeeded, so that if you fail before that, transaction cleanup > takes care of it automatically. Alternatively, destroying what existed > before could be deferred until later, when an as-yet-unfailed > transaction stumbles across the tombstone. Oh, yeah, good idea. > Am I worrying too much? Possibly! But as I said to David on another > thread this morning, it's better to worry on pgsql-hackers before any > problem happens than to start worrying after something bad happens in > a customer situation. I'll give what you suggested a try. It seems reasonable enough. -- nathan