Re: WIP: Upper planner pathification
От | Amit Kapila |
---|---|
Тема | Re: WIP: Upper planner pathification |
Дата | |
Msg-id | CAA4eK1+sULn6s4057jNQ5xpz4g0BtFdhXG49zCpo6DMcve263g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: WIP: Upper planner pathification (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: WIP: Upper planner pathification
|
Список | pgsql-hackers |
On Mon, Mar 7, 2016 at 9:13 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Amit Kapila <amit.kapila16@gmail.com> writes:
> >>>> Is there some reason why hash and nestloop are safe but merge isn't?
>
> > To make hash and nestloop work in parallel queries, we just push those
> > nodes below gather node. Refer code
> > paths match_unsorted_outer()->consider_parallel_nestloop()
> > and hash_inner_and_outer()->try_partial_hashjoin_path().
>
> AFAICS, those are about generating partial paths, which is a completely
> different thing from whether a regular path is parallel-safe or not.
>
> Amit Kapila <amit.kapila16@gmail.com> writes:
> >>>> Is there some reason why hash and nestloop are safe but merge isn't?
>
> > To make hash and nestloop work in parallel queries, we just push those
> > nodes below gather node. Refer code
> > paths match_unsorted_outer()->consider_parallel_nestloop()
> > and hash_inner_and_outer()->try_partial_hashjoin_path().
>
> AFAICS, those are about generating partial paths, which is a completely
> different thing from whether a regular path is parallel-safe or not.
>
Okay, but the main point I wanted to convey is that I think setting parallel_degree = 0 in mergejoin path is not necessarily a copy-paste error. If you see the other path generation code like create_index_path(), create_samplescan_path(), etc. there we set parallel_degree to zero even though the parallel-safety is determined based on reloptinfo. And I don't see any use of setting parallel_degree for path which can't be pushed beneath gather (aka can be executed by multiple workers).
В списке pgsql-hackers по дате отправления: