Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd
От | Andy Fan |
---|---|
Тема | Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd |
Дата | |
Msg-id | CAKU4AWoSJXhnnc=C3AGKRLqUmsk1ibzL25WZp-s=FAVoGJnQag@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd (Dilip Kumar <dilipbalaut@gmail.com>) |
Ответы |
Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd
|
Список | pgsql-hackers |
You will see there are many pointers also in
RelationData but we ensure before we access them they are initialized,
The initialized values are not much helpful in the cases I provided here.
What do you think about this question?
2. _If_ the relation can be reset after we open it during Executor code, then would the
relation (RelationData *) pointed memory still validated after the relcache reset? For example
CREATE TABLE t(a int);
INSERT INTO t VALUES(1), (2);
UPDATE t set a = 100;
We need to update 2 tuples in the update statement, if the relcache is reset after the first tuple is
updated, can we still use the previous (RelationData *) to do the 2nd update? This is just
a common example. If you would say, in this case the relcache can't be reset, then the question
come back to what situation the relcache can be reset between the first time I open it during execution
code and the end of execution code. I think we have some talks about this at [1].
Right now, I am not pretty sure I am doing something well. That's why I post the question here. but still
I didn't find a better solution right now. [2]
Best Regards
Andy Fan
В списке pgsql-hackers по дате отправления: