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>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "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>, Thom Brown <thom(at)linux(dot)com>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
Subject: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Date: 2015-12-11 09:48:45
Message-ID: 566A9BFD.7070001@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015/12/11 14:16, Ashutosh Bapat wrote:
> On Thu, Dec 10, 2015 at 11:20 PM, Robert Haas <robertmhaas(at)gmail(dot)com
> <mailto:robertmhaas(at)gmail(dot)com>> wrote:

> On Tue, Dec 8, 2015 at 6:40 AM, Etsuro Fujita
> <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp <mailto:fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>>
> wrote:
> > IMO I want to see the EvalPlanQual fix in the first version for 9.6.
>
> +1.

> I think there is still a lot functionality that is offered without
> EvalPlanQual fix. As long as we do not push joins when there are
> RowMarks involved, implementation of that hook is not required. We won't
> be able to push down joins for DMLs and when there are FOR SHARE/UPDATE
> clauses in the query. And there are huge number of queries, which will
> be benefitted by the push down even without that support. There's
> nothing in this patch, which comes in way of implementing the
> EvalPlanQual fix. It can be easily added after committing the first
> version. On the other hand, getting minimal (it's not really minimal,
> it's much more than that) support for postgres_fdw support committed
> opens up possibility to work on multiple items (as listed in my mail) in
> parallel.

> I am not saying that we do not need EvalPlanQual fix in 9.6. But it's
> not needed in the first cut. If we get the first cut in first couple of
> months of 2016, there's plenty of room for the fix to go in 9.6. It
> would be really bad situation if we could not get postgres_fdw join
> pushdown supported in 9.6 because EvalPlanQual hook could not be
> committed while the rest of the code is ready. EvalPlanQual fix in core
> was being discussed since April 2015. It took 8 months to get that
> fixed. Hopefully we won't need that long to implement the hook in
> postgres_fdw, but that number says something about the complexity of the
> feature.

ISTM that further enhancements are of secondary importance. Let's do the
EvalPlanQual fix first. I'll add the RecheckForeignScan callback routine
to your version of the postgres_fdw patch as soon as possible.

Best regards,
Etsuro Fujita

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2015-12-11 09:54:57 Re: Patch: ResourceOwner optimization for tables with many partitions
Previous Message Etsuro Fujita 2015-12-11 09:44:58 Re: Remaining 9.5 open items