Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, Thom Brown <thom(at)linux(dot)com>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
Subject: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Date: 2016-02-16 06:56:41
Message-ID: 56C2C829.3060403@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016/02/16 15:22, Ashutosh Bapat wrote:
> During join planning, the planner tries multiple combinations of joining
> relations, thus the same base or join relation can be part of multiple
> of combination. Hence remote_conds or joinclauses will get linked
> multiple times as they are bidirectional lists, thus breaking linkages
> of previous join combinations tried. E.g. while planning A join B join C
> join D planner will come up with combinations like A(B(CD)) or (AB)(CD)
> or ((AB)C)D etc. and remote_conds from A will first be linked into
> A(B(CD)), then AB breaking the first linkages.

Exactly, but I don't think that that needs to be considered because we
have this at the beginning of postgresGetGForeignJoinPaths:

/*
* Skip if this join combination has been considered already.
*/
if (joinrel->fdw_private)
return;

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2016-02-16 07:01:06 Re: planstats.sgml
Previous Message Michael Paquier 2016-02-16 06:55:14 Re: extend pgbench expressions with functions