postgres_fdw: Push down joins to remote servers.

If we've got a relatively straightforward join between two tables,

this pushes that join down to the remote server instead of fetching

the rows for each table and performing the join locally. Some cases

are not handled yet, such as SEMI and ANTI joins. Also, we don't

yet attempt to create presorted join paths or parameterized join

paths even though these options do get tried for a base relation

scan. Nevertheless, this seems likely to be a very significant win

in many practical cases.

Shigeru Hanada and Ashutosh Bapat, reviewed by Robert Haas, with

additional review at various points by Tom Lane, Etsuro Fujita,

KaiGai Kohei, and Jeevan Chalke.

Branch

------

master

Details

-------

http://git.postgresql.org/pg/commitdiff/e4106b2528727c4b48639c0e12bf2f70a766b910

Modified Files

--------------

contrib/postgres_fdw/deparse.c | 531 +++++++++---

contrib/postgres_fdw/expected/postgres_fdw.out | 1094 ++++++++++++++++++++++--

contrib/postgres_fdw/postgres_fdw.c | 835 ++++++++++++++++--

contrib/postgres_fdw/postgres_fdw.h | 46 +-

contrib/postgres_fdw/sql/postgres_fdw.sql | 213 ++++-

doc/src/sgml/postgres-fdw.sgml | 10 +

6 files changed, 2464 insertions(+), 265 deletions(-)