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?