Re: postgres_fdw bug in 9.6

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw bug in 9.6
Date: 2017-01-20 03:41:12
Message-ID: fab76fdb-23b5-e39c-6bc3-fbd9ee2542c4@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017/01/19 12:26, Ashutosh Bapat wrote:
> On Thu, Jan 19, 2017 at 2:14 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Fri, Jan 13, 2017 at 6:22 AM, Etsuro Fujita
>> <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vinayak 2017-01-20 04:31:43 Re: New SQL counter statistics view (pg_stat_sql)
Previous Message Keith Fiske 2017-01-20 03:40:37 Re: Declarative partitioning - another take