Re: [HACKERS] parallel index(-only) scan breaks when run without parallelism

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [HACKERS] parallel index(-only) scan breaks when run without parallelism
Дата
Msg-id CAA4eK1Kq5qb_u2AOoda5XBB91vVWz90w=LgtRLgsssriS8pVTw@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] parallel index(-only) scan breaks when run without parallelism  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, Mar 8, 2017 at 12:27 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> Amit, Rafia,
>
> nodeIndexscan.c, unlike nodeSeqscan.c, thinks that a parallel-aware
> scan will always be executed in parallel mode.  But that's not true:
> an Execute message with a non-zero row count could cause us to abandon
> planned parallelism and execute the plan serially.
>

Right, and the current code had assumed that if there is a parallel
plan then it will always enter the parallel mode.   I think the fix is
quite similar to what we do in nodeSeqscan.c i.e. initialize the scan
descriptor before starting the scan if it is not already initialized.
 There is an additional check required for ensuring if index runtime
keys are ready before calling index_rescan.  Attached patch fixes the
problem.


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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Amit Khandekar
Дата:
Сообщение: Re: [HACKERS] Parallel Append implementation
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Enabling replication connections by default in pg_hba.conf