On Mon, Jan 31, 2022 at 12:57 PM houzj.f...@fujitsu.com <houzj.f...@fujitsu.com> wrote: > > Attach the V74 patch set which did the following changes: >
In the v74-0001 patch, I noticed the following code in get_rel_sync_entry(): + /* + * Tuple slots cleanups. (Will be rebuilt later if needed). + */ + oldctx = MemoryContextSwitchTo(data->cachectx); + + if (entry->old_slot) + ExecDropSingleTupleTableSlot(entry->old_slot); + if (entry->new_slot) + ExecDropSingleTupleTableSlot(entry->new_slot); + + entry->old_slot = NULL; + entry->new_slot = NULL; + + MemoryContextSwitchTo(oldctx); I don't believe the calls to MemoryContextSwitchTo() are required here, because within the context switch it's just freeing memory, not allocating it. Regards, Greg Nancarrow Fujitsu Australia