From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()
Date: Thu, 29 Jun 2023 10:26:24 -0400
Message-ID: <1509402.1688048784@sss.pgh.pa.us> (raw)
In-Reply-To: <e6cbff03-32c3-4048-78b6-54d2907ba852@dunslane.net>
References: <17994-5c7100b51b4790e9@postgresql.org>
<1306569.1687978174@sss.pgh.pa.us>
<20230628194446.uu47f4vyfyjfl7dd@awork3.anarazel.de>
<1314841.1687981948@sss.pgh.pa.us>
<20230628205443.6gu5bmcck6t4pgyv@awork3.anarazel.de>
<e52f6028-7196-8545-9726-a17a50ea14a3@dunslane.net>
<e6cbff03-32c3-4048-78b6-54d2907ba852@dunslane.net>
Andrew Dunstan <andrew@dunslane.net> writes:
> After (not) sleeping on this overnight, and discussing it with a
> colleague this morning, here's a suggestion. We have a hash table, keyed
> by (tdtypeid, attnum) where we store a datumCopy'd version of the value.
> If it's present just return the value instead of getting it from the
> tupdesc. The hash table is blown away at the end of the transaction.
> Assuming that's workable I think it would not be a large patch.
That sounds possibly workable. I'm a bit concerned about added
overhead, and about whether the hashtable needs invalidation support.
It might be better to key it off (relfilenode, attnum).
> My colleague did ask if we had live reproducible case.
I have not attempted to build one, but it'd probably be fairly
easy to do if you turn on debug_discard_caches.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, andres@anarazel.de, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()
In-Reply-To: <1509402.1688048784@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox