Re: Status of FDW pushdowns

From: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Denis Lussier <denis(dot)lussier(at)openscg(dot)com>
Subject: Re: Status of FDW pushdowns
Date: 2013-11-21 15:35:46
Message-ID: CADyhKSXGGtETULADsmWE86UA9mC_z95XbB_CmjuwN2zPWaSzqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/11/21 Bruce Momjian <bruce(at)momjian(dot)us>:
> Where are we on the remaining possible pushdowns for foreign data
> wrappers, particularly the Postgres one? I know we do WHERE restriction
> pushdowns in 9.3, but what about join and aggregate pushdowns? Is
> anyone working on those?
>
> I know join pushdowns seem insignificant, but it helps to restrict what
> data must be passed back because you would only pass back joined rows.
>
> Do we document these missing features anywhere?
>
Probably, custom-scan api will provide more flexible way to push-down
aggregate, sort or other stuff performing on regular tables, not only
foreign tables.
It allows extensions to offer alternative scan/join path on the planning
stage, then executor callbacks its custom logic instead of the built-in
one, if its cost is cheaper.

Right now, it performs on relation scan or join only. However, we will be
able to apply same concept on aggregation.
For example, an aggregation node on a foreign table scan is a good
candidate to push down because it can be replaced with a custom-
logic that scans a materialized result of the remote aggregation query,
if its cost is enough cheap than local aggregation.
Probably, we need to add a hook and some logic to compare the
built-in aggregation and alternative paths provided by extensions.
It is also helpful for the people who want to implement something like
"parallel aggregate" performing on regular tables, not only foreign table.

Thanks,
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-21 15:44:22 Re: Status of FDW pushdowns
Previous Message Andres Freund 2013-11-21 15:27:53 Re: Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1