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.94.2) (envelope-from ) id 1qY46O-000hMD-DT for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Aug 2023 12:33:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qY46M-006J2J-TJ for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Aug 2023 12:33:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qY46M-006J1y-Jx for pgsql-bugs@lists.postgresql.org; Mon, 21 Aug 2023 12:33:46 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qY46J-0009OS-B9 for pgsql-bugs@lists.postgresql.org; Mon, 21 Aug 2023 12:33:45 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id C5449320093B; Mon, 21 Aug 2023 08:33:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 21 Aug 2023 08:33:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :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=1692621221; x= 1692707621; bh=D1xRh7PrFeGli4T4o3kPaidK0Z3kg+nCLIKyIaWZjQw=; b=L fgXXI2FhvXTc3CVMv+pRBGp2s6rUsTkYWLCe2erlBP8MDTPj7+ZR+LvONS4j1smd JwKh4ypa9IXIKx3BJHTEwWI8Ztqas2etjv0sKkAEjcKVaSnd8DAaYMnb/ynLaNav iLxlbjreOdzWvQ4TLL0FmkHP/jlv9n4lkNukZElTa5PWn59zwK39xy+dy9cIHLDF +r1e04kxRe/eEw3ApuOur/Jvpab4bt5VUsGBLWKOVfA9qC0dA+zbD62FZ+T4rHXA H+47ESigDeQF6Vhk7jvpmaOba1p3fUJx+M0ItmUKJYAxsLuxh0A2ljNPwrW3Wo6t 5OSjBrZon/XDtfmnsH1ZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudduledgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Aug 2023 08:33:40 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D80EE425; Mon, 21 Aug 2023 14:33:37 +0200 (CEST) Date: Mon, 21 Aug 2023 14:33:37 +0200 From: Alvaro Herrera To: Andrew Dunstan Cc: Andres Freund , Tom Lane , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm() Message-ID: <20230821123337.fytudn7wtjlgtttk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0ac465e9-f6e2-4927-5aa9-a45ed6ce3801@dunslane.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, On 2023-Jul-12, Andrew Dunstan wrote: > + entry = hash_search(missing_cache, &key, HASH_ENTER, &found); > + > + if (!found) > + { > + /* cache miss, so we need a non-transient copy of the datum */ > + oldctx = MemoryContextSwitchTo(TopMemoryContext); > + entry->value = > + datumCopy(attrmiss->am_value, false, att->attlen); > + MemoryContextSwitchTo(oldctx); > + } Hmm ... when exactly do these values get freed if no longer needed? Is the theory that leaking them is not relevant? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Oh, great altar of passive entertainment, bestow upon me thy discordant images at such speed as to render linear thought impossible" (Calvin a la TV)