On Wed, May 19, 2021 at 9:54 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Tue, May 18, 2021 at 11:46:25PM -0400, Tom Lane wrote:
> > I was wondering if we could move the ExecCleanupTupleRouting call
> > into finish_estate. copyfrom.c, for example, does that during
> > its shutdown function. Compare also the worker.c changes proposed
> > in
>
> Yeah, the first patch I wrote for this thread was pushing out
> PopActiveSnapshot() into the finish() routine, but I really found the
> creation of the ModifyTableState stuff needed for a partitioned table
> done in create_estate_for_relation() to make the code more confusing,
> as that's only a piece needed for the tuple routing path.
>
How about moving AfterTriggerEndQuery() to apply_handle_*_internal
calls? That way, we might not even need to change Push/Pop calls.
--
With Regards,
Amit Kapila.