On Wed, Oct 13, 2021 at 10:00 PM Ajin Cherian <itsa...@gmail.com> wrote: > > I have made the change to use the virtual slot for expression > evaluation and avoided tuple deformation. >
I started looking at the v32-0006 patch and have some initial comments. Shouldn't old_slot, new_slot and tmp_new_slot be cached in the RelationSyncEntry, similar to scantuple? Currently, these slots are always getting newly allocated each call to pgoutput_row_filter_update() - and also, seemingly never deallocated. We previously found that allocating slots each time for each row filtered (over 1000s of rows) had a huge performance overhead. As an example, scantuple was originally newly allocated each row filtered, and to filter 1,000,000 rows in a test case it was taking 40 seconds. Caching the allocation in RelationSyncEntry reduced it down to about 5 seconds. Regards, Greg Nancarrow Fujitsu Australia