From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal : Parallel Merge Join |
Date: | 2017-03-07 14:17:40 |
Message-ID: | CA+TgmoZb5_yQ08sN3=uYqDZ7J+MsvzPOsAvEg1azr+5kwT2cAw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 7, 2017 at 5:16 AM, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> I am confused about whether to call
> "get_cheapest_parallel_safe_total_inner" with
> innerrel->cheapest_parameterized_paths like we do in case of
> hash_inner_and_outer or with
> innerrel->pathlist. The reason behind I am calling this with complete
> pathlist (innerrel->pathlist) is that inside generate_mergejoin_paths
> it calls "get_cheapest_path_for_pathkeys" for complete pathlist and if
> we decide not to call consider_parallel_mergejoin if the cheapest
> parallel safe path in innerrel->cheapest_parameterized_paths is NULL
> then it will not be fair (we might have some parallel safe paths in
> innerrel->pathlist).
You're right to be confused, because that seems to be a bug in the
existing code. There seems to be no guarantee that the cheapest
parallel-safe path will be in the cheapest_parameterized_paths list.
I'll go fix that.
As a matter of style, when testing a value of type "bool", write if
(x) or if (!x). When testing a variable of some other type, say int,
write if (x == 0) or if (x != 0) or whatever.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2017-03-07 14:46:57 | Re: PATCH: two slab-like memory allocators |
Previous Message | Rafia Sabih | 2017-03-07 14:07:47 | Re: Enabling parallelism for queries coming from SQL or other PL functions |