Re: row filtering for logical replication
| От | Greg Nancarrow |
|---|---|
| Тема | Re: row filtering for logical replication |
| Дата | |
| Msg-id | CAJcOf-fVbz8=0+giyxZQCR2p_61wj-oGAD2mGhszaUErmGjA5Q@mail.gmail.com обсуждение исходный текст |
| Ответ на | RE: row filtering for logical replication ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>) |
| Список | pgsql-hackers |
On Mon, Jan 31, 2022 at 12:57 PM houzj.fnst@fujitsu.com <houzj.fnst@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
В списке pgsql-hackers по дате отправления: