Horiguchi-san, On Fri, May 28, 2021 at 5:29 PM Kyotaro Horiguchi <horikyota....@gmail.com> wrote: > At Fri, 28 May 2021 16:30:29 +0900, Etsuro Fujita <etsuro.fuj...@gmail.com> > wrote in > > The root cause would > > be that we call classify_matching_subplans() to re-determine > > sync/async subplans when called from the first ExecAppend() after the > > first ReScan, even if do_exec_prune=false, which is incorrect because > > in that case it is assumed to re-use sync/async subplans determined > > during the the first ExecAppend() after Init.
I noticed I wrote it wrong. If do_exec_prune=false, we would determine sync/async subplans during ExecInitAppend(), so the “re-use sync/async subplans determined during the the first ExecAppend() after Init" part should be corrected as “re-use sync/async subplans determined during ExecInitAppend()”. Sorry for that. > The patch drops some "= NULL" (initial) initializations when > nasyncplans == 0. AFAICS makeNode() fills the returned memory with > zeroes but I'm not sure it is our convention to omit the > intializations. I’m not sure, but I think we omit it in some cases; for example, we don’t set as_valid_subplans to NULL explicitly in ExecInitAppend(), if do_exec_prune=true. > Otherwise the patch seems to make the code around cleaner. Thanks for reviewing! Best regards, Etsuro Fujita