Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfAmw-0005Iz-Td for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Apr 2022 01:30:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nfAmv-0001PU-Ae for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Apr 2022 01:30:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfAmv-0001PK-1G for pgsql-hackers@lists.postgresql.org; Fri, 15 Apr 2022 01:30:17 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfAmt-0000AI-0i for pgsql-hackers@lists.postgresql.org; Fri, 15 Apr 2022 01:30:15 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id CE68C3202469; Thu, 14 Apr 2022 21:30:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 14 Apr 2022 21:30:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1649986212; x=1650072612; bh=ih56HROX8j L87JcFHpZuIDrV3MT8Y6kMDU6rGem2pmg=; b=D6PckuPNUEhnbpq/HMOUXJj0aJ PvcA2xDNO0r6+We2T1U3N3G82cCZXCpf7sbGaCfiKTNA228Qx0fYU6Hv8bCasQlW WNwLhIriHUHv7eWYIkzhaPZEjzKKl0S/ifC1Kq3pcPFAdylH6fXFSYnxaLJY7PYC EtZokzvaj5IHLksuISwoTjXpTDDn868jQ6IZQxga/hLZiTgk5iCa2xOLgnLdkwpc Oq6JvC0/Bnv+RVQKZkw/1+53FxSLtJra8gyqFAdXgM0eflBODlbeP+kCiKk/yfDM 4QEckAjesk9YrdFPApqqIE73Y0lsolKb11VrehloZ+WqGmmCFl/llc+a0NdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1649986212; x= 1650072612; bh=ih56HROX8jL87JcFHpZuIDrV3MT8Y6kMDU6rGem2pmg=; b=f ELG4lXGfTPZP8p7nTcckey/u+QlHQhwLGn9HueEpr6XZ774YKl4Iuzpvcim8w/vO 91h7I6ToZJk/YC4yUJ4CT2w4rATyco9ClWnCX3ezqjiFjAf9ynVjooO7bHGx8tU8 L3m9Hib3G8K8sDYWdX+80UnJw/o+Q/3O1CXLraI+leoPuw1ChZafDPZzOe+adgwc 3EtJCcoB0cItzRC2xCitNaPJMGWesU3iNFA/9qEWaZrxiCNurlyNYI/Csm8yVNJ9 lxkrkteJsHilnxRJ2xK5kDUP3AoMplcP4OhDTPGIQXVeNZ5RXKkR3SGKJoHhYCZW 8OZlsuRgjH3HRynTYUw7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelgedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Apr 2022 21:30:11 -0400 (EDT) Date: Thu, 14 Apr 2022 18:30:10 -0700 From: Andres Freund To: Tom Lane Cc: Robert Haas , Justin Pryzby , Kyotaro Horiguchi , Erik Rijkers , Matthias van de Meent , PostgreSQL Hackers Subject: Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403) Message-ID: <20220415013010.2fctkwpi5js6dfno@alap3.anarazel.de> References: <1471620.1649947373@sss.pgh.pa.us> <1484483.1649951206@sss.pgh.pa.us> <20220414165425.pxn22hdlwdrcouh6@alap3.anarazel.de> <1527714.1649957811@sss.pgh.pa.us> <1535399.1649963150@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1535399.1649963150@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-04-14 15:05:50 -0400, Tom Lane wrote: > Andres' complaint is that that snapshot might get invalidated when you > weren't expecting it, but I'm not really convinced that we have all > that many bugs of that ilk. Wouldn't CLOBBER_CACHE_ALWAYS testing > find them? Don't see why it would - we don't have any mechanism in place for enforcing that we don't update / delete a tuple we've looked up with an xmin that wasn't continually enforced. A typical pattern is to use a catalog cache (registered an all) for a syscache lookup, but then not have a registered / active snapshot until an eventual update / delete (after the syscache scan ends). Which isn't safe, because without a MyProc->xmin set, the tuple we're updating / deleting could be updated, removed and replaced with another tuple. Greetings, Andres Freund