On Mon, Mar 14, 2022 at 2:37 AM Tomas Vondra <tomas.von...@enterprisedb.com> wrote: > > On 3/12/22 05:30, Amit Kapila wrote: > >> ... > > > > Okay, please find attached. I have done basic testing of this, if we > > agree with this approach then this will require some more testing. > > > > Thanks, the proposed changes seem like a clear improvement, so I've > added them, with some minor tweaks (mostly to comments). >
One minor point: Did you intentionally remove list_free(rel_publications) before resetting the list from the second patch? The memory for rel_publications is allocated in TopTransactionContext, so a large transaction touching many relations will only free this at end of the transaction which may not be a big deal as we don't do this every time. We free this list a few lines down in successful case so this appears slightly odd to me but I am fine if you think it doesn't matter. -- With Regards, Amit Kapila.