On 2017/01/19 12:26, Ashutosh Bapat wrote:
> On Thu, Jan 19, 2017 at 2:14 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Fri, Jan 13, 2017 at 6:22 AM, Etsuro Fujita
>> <fujita.etsuro@lab.ntt.co.jp> wrote:
>>> My biggest concern about GetExistingLocalJoinPath is that might not be
>>> extendable to the case of foreign-join paths with parameterization; in which
>>> case, fdw_outerpath for a given foreign-join path would need to have the
>>> same parameterization as the foreign-join path, but there might not be any
>>> existing paths with the same parameterization in the path list.
>> I agree that this is a problem.
> Effectively, it means that foreign join path creation will have a
> parameterization different (per add_path()) from any local join
> produced. But why would it be so?
I think it's better to give the FDW a chance to do that because the FDW
might have more knowledge about the parameterization for joinrels than core.
> The parameterization bubbles up from
> the base relation. The process for creating parameterized local and
> foreign paths for a base relation is same. Thus we will have same
> parameterizations considered for foreign as well as local joins. Those
> different parameterizations will be retained add_path(), so we should
> find one there
Is that right? I think there would be cases where we can't find one
because add_path removes paths dominated by others.
Best regards,
Etsuro Fujita