Re: Parallel Seq Scan

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Parallel Seq Scan
Дата
Msg-id CAA4eK1+udTDYgKbacVv7cdPrvp_ZEPWqV2vwTzu3p4FVzmDFDw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel Seq Scan  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Parallel Seq Scan  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, Mar 10, 2015 at 12:26 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> 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.
> >
>
> 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.
>

We can't directly call DestroyParallelContext() to terminate workers as
it can so happen that by that time some of the workers are still not started.
So that can lead to problem.  I think what we need here is a way to know
whether all workers are started. (basically need a new function
WaitForParallelWorkersToStart()).  This API needs to be provided by
parallel-mode patch.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Proposal : REINDEX xxx VERBOSE
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: recovery_target_action doesn't work for anything but shutdown