Re: Parallel Seq Scan
От | Amit Kapila |
---|---|
Тема | Re: Parallel Seq Scan |
Дата | |
Msg-id | CAA4eK1JjA+jq216n=E+51U393RgewALoMt1+VCuG7CEyjaLMKg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Parallel Seq Scan (Haribabu Kommi <kommi.haribabu@gmail.com>) |
Ответы |
Re: Parallel Seq Scan
|
Список | pgsql-hackers |
On Tue, Mar 10, 2015 at 10:23 AM, Haribabu Kommi <kommi.haribabu@gmail.com> wrote:
>
> On Tue, Mar 10, 2015 at 3:09 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> > 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).
> >
> > Can you elaborate more if you think current handling is not sufficient
> > for any case?
>
> From ExecReScanFunnel function it seems that the re-scan waits till
> all the workers
> has to be finished to start again the next scan. Are the workers will
> stop the current
> ongoing task? otherwise this may decrease the performance instead of
> improving as i feel.
>
>
> On Tue, Mar 10, 2015 at 3:09 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> > 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).
> >
> > Can you elaborate more if you think current handling is not sufficient
> > for any case?
>
> From ExecReScanFunnel function it seems that the re-scan waits till
> all the workers
> has to be finished to start again the next scan. Are the workers will
> stop the current
> ongoing task? otherwise this may decrease the performance instead of
> improving as i feel.
>
Okay, performance-wise it might effect such a case, but I think we can
handle it by not calling WaitForParallelWorkersToFinish(),
as DestroyParallelContext() will automatically terminate all the workers.
as DestroyParallelContext() will automatically terminate all the workers.
> I am not sure if it already handled or not, when a worker is waiting
> to pass the results,
> whereas the backend is trying to start the re-scan?
>
> to pass the results,
> whereas the backend is trying to start the re-scan?
>
I think stopping/terminating workers should handle such a case.
Thanks for pointing out this case, I will change it in next update.
В списке pgsql-hackers по дате отправления: