On Thu, Mar 12, 2015 at 4:22 PM, Amit Langote <
Langote_Amit_f8@lab.ntt.co.jp> wrote:
>
> On 10-03-2015 PM 01:09, Amit Kapila wrote:
> > On Tue, Mar 10, 2015 at 6:50 AM, Haribabu Kommi <
kommi.haribabu@gmail.com>
> >> Is this patch handles the cases where the re-scan starts without
> >> finishing the earlier scan?
> >>
> >
> > Do you mean to say cases like ANTI, SEMI Join (in nodeNestLoop.c)
> > where we scan the next outer tuple and rescan inner table without
> > completing the previous scan of inner table?
> >
> > I have currently modelled it based on existing rescan for seqscan
> > (ExecReScanSeqScan()) which means it will begin the scan again.
> > Basically if the workers are already started/initialized by previous
> > scan, then re-initialize them (refer function ExecReScanFunnel() in
> > patch).
> >
>
> From Robert's description[1], it looked like the NestLoop with Funnel would
> have Funnel as either outer plan or topmost plan node or NOT a parameterised
> plan. In that case, would this case arise or am I missing something?
>
Probably not if the costing is right and user doesn't manually disable
plans (like by set enable_* = off). However we should have rescan code
incase it chooses the plan such that Funnel is inner node and I think
apart from that also in few cases Rescan is required.