On Mon, Mar 7, 2016 at 9:13 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Amit Kapila <amit.kapil...@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