Re: Status of FDW pushdowns - Mailing list pgsql-hackers

From Kohei KaiGai
Subject Re: Status of FDW pushdowns
Date
Msg-id CADyhKSXGGtETULADsmWE86UA9mC_z95XbB_CmjuwN2zPWaSzqg@mail.gmail.com
Whole thread Raw
In response to Status of FDW pushdowns  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Status of FDW pushdowns  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Status of FDW pushdowns  (Shigeru Hanada <shigeru.hanada@gmail.com>)
List pgsql-hackers
2013/11/21 Bruce Momjian <bruce@momjian.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@kaigai.gr.jp>



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1
Next
From: Tom Lane
Date:
Subject: Re: Status of FDW pushdowns