Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm() - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()
Date
Msg-id 20230821123337.fytudn7wtjlgtttk@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()  (Andrew Dunstan <andrew@dunslane.net>)
List 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)



pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #18057: unaccent removes intentional spaces
Next
From: Masahiko Sawada
Date:
Subject: Re: BUG #18055: logical decoding core on AllocateSnapshotBuilder()