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 CAKU4AWr2s2=OHd-KF-HvgaXGmHFDLHW=sf7sKpc1824zrnwnNQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd  (Andy Fan <zhihui.fan1213@gmail.com>)
Ответы Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
 
Why do you think this ought to be in the relcache, and not in the
executor's rangetable-associated data structures?

I re-think about this,  I guess I didn't mention something  clear enough.
That's true that I bound my bala struct to Relation struct, and the memory
relation used  is allocated in relcache.  but the memory of bala is allocated in
TopTransactionMemory context.  

xxx_table_tuple_insert(Relation rel, ...)
{
   if (rel->balabala == NULL)
        rel->balabala = allocate_bala_resource(rel);  //  TopTransactionContext.
   do_task_with(rel->balabala); 
}

not sure if this should be called as putting my data in relcache. 

and I rechecked the RelationData struct, and it looks like some Executor-bind struct also
resides in it. for example: RelationData.rd_lookInfo.  If the relcache can be reset, the 
fields like this are unsafe to access as well.  Am I missing something? 

--
Best Regards
Andy Fan

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andy Fan
Дата:
Сообщение: Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd
Следующее
От: Greg Nancarrow
Дата:
Сообщение: Re: Correct handling of blank/commented lines in PSQL interactive-mode history