Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()
Date: 2023-08-21 12:33:37
Message-ID: 20230821123337.fytudn7wtjlgtttk@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2023-08-21 12:41:46 Re: BUG #18055: logical decoding core on AllocateSnapshotBuilder()
Previous Message Michael Paquier 2023-08-21 07:14:20 Re: BUG #18057: unaccent removes intentional spaces