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 1nf3on-0007fZ-3I for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Apr 2022 18:03:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nf3ol-0001Sj-FY for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Apr 2022 18:03:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nf3oj-0001Sa-NY for pgsql-hackers@lists.postgresql.org; Thu, 14 Apr 2022 18:03:43 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nf3of-0006Lz-UB for pgsql-hackers@lists.postgresql.org; Thu, 14 Apr 2022 18:03:41 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 566125C0232; Thu, 14 Apr 2022 14:03:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 14 Apr 2022 14:03:35 -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=1649959415; x=1650045815; bh=7Kep6mCRik w15P/orfeo21VO2FP+7ejl23ufBAjgPu0=; b=LxzpBwndh8/q5xSoMLAuYK5cjY LkMoilIFGBvqHUYkzI1UY3psTDIRwiYNxT/ayz+2d1g5BFk/GbZbjMHAxA6CJCKS PQftouZrhdC3JqIP0vIWWAc7vvR/29EAkrC7oRgtRJrb5a6heevVd41Hyn0k/QfN u19l2Eouoh5TFnWhvu7QNrt1d4pV+2vOAa5TQFGpKKp/yHsm6ZZuoXxPmOsvIZF9 uhvS6FLBOiOiuqTiFi6C00TisSmHJdKIp4dYlMlDlaHt1G6uqBxqqHPbfz8nIolG JqimrXiv7h0BJtpeuIeJ0GkiUIAHM5UPN0ZeBRqDKac6ytL2JTGQCWiO19Xw== 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=1649959415; x= 1650045815; bh=7Kep6mCRikw15P/orfeo21VO2FP+7ejl23ufBAjgPu0=; b=a 1dKN61PmUg/MU+ICHK0slfu1400LoSja/FxwHX59HkWDqNyzvFj3rvcUw1J15PTN t/HyZTMsCTSNvdmECqepYsLU+PsfhSGZcwIv+Gs6qif0aCaQZLY3nZ3gR6lghrX7 ItDgk0rBdePV84EyqPRcLOGvFMselY+ymU7zmZdgrXcMQAxnZ6hgRt0U4JuCPkfO pjmqugC+eqNrf6V5YGG0bEwQXoMdOrtwXmaIE1ZsYUUxra1hHxIkSrxdMErpLXsK WYrz/N5aFY57OqmyW8knooa9JbGgOh7bVSa3raPKIbDxCZOIR8L9hTITIhW+1PAt i6rFhL5rafBZe0O3AFCLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelfedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeff hfeuffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Apr 2022 14:03:33 -0400 (EDT) Date: Thu, 14 Apr 2022 11:03:32 -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: <20220414180332.ryfirpfvbuxgujfm@alap3.anarazel.de> References: <20220413202819.GR26620@telsasoft.com> <20220414003802.e37dgzkgbi5t7ha4@alap3.anarazel.de> <1471620.1649947373@sss.pgh.pa.us> <1484483.1649951206@sss.pgh.pa.us> <20220414165425.pxn22hdlwdrcouh6@alap3.anarazel.de> <1527714.1649957811@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527714.1649957811@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 13:36:51 -0400, Tom Lane wrote: > What if the reason we need a snapshot is to detoast some toasted item > we read from a catalog with the CatalogSnapshot? There might not be > any other valid snapshot, so I don't think I buy your argument here. We definitely do have places doing that, but is it ever actually safe? Part of the catalog access might cause cache invalidations to be processed, which can invalidate the snapshot (including resetting MyProc->xmin). Afaics we always would have push or register the snapshot, either will copy the snapshot, I think? Greetings, Andres Freund