Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd
Date
Msg-id 1215110.1638196404@sss.pgh.pa.us
Whole thread Raw
In response to Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd  (Andy Fan <zhihui.fan1213@gmail.com>)
Responses Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd
List pgsql-hackers
Andy Fan <zhihui.fan1213@gmail.com> writes:
> During my recent work,  I need some new stuff attached to Relation.  Rather
> than adding
> some new data structures,  I added it to Relation directly.  Like
> relation->balabala.  Then
> I initialize it during ExecutorRun,  like  table_tuple_insert.. and
> destroy it at ExecutorEnd.

This is not going to work, at least not if you expect that a relcache
reset would not preserve the data.  Also, what happens in the case of
nested executor runs touching the same relation?

Why do you think this ought to be in the relcache, and not in the
executor's rangetable-associated data structures?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rationalizing declarations of src/common/ variables
Next
From: Robert Haas
Date:
Subject: Re: Rationalizing declarations of src/common/ variables