pgsql: postgres_fdw: Push down joins to remote servers.

Lists: pgsql-committerspgsql-hackers
From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: postgres_fdw: Push down joins to remote servers.
Date: 2016-02-09 19:15:57
Message-ID: E1aTDlV-0007xw-Vj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

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(-)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <rhaas(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: postgres_fdw: Push down joins to remote servers.
Date: 2016-02-09 20:10:15
Message-ID: 19611.1455048615@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Robert Haas <rhaas(at)postgresql(dot)org> writes:
> postgres_fdw: Push down joins to remote servers.

The buildfarm is not very impressed with this patch.

regards, tom lane


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: postgres_fdw: Push down joins to remote servers.
Date: 2016-02-09 20:42:11
Message-ID: CA+TgmoaZ+TwyNV1gDfDSyNQus9X_+c0aef8_wyN4x0aYK_rm3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Tue, Feb 9, 2016 at 3:10 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <rhaas(at)postgresql(dot)org> writes:
>> postgres_fdw: Push down joins to remote servers.
>
> The buildfarm is not very impressed with this patch.

Well, I guess that's why we have regression tests. It looks like that
test case introduces a dependency on particular CTID values that
wasn't there before. That doesn't seem like a very good idea; I'll
remove that test.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: postgres_fdw: Push down joins to remote servers.
Date: 2016-02-10 06:48:15
Message-ID: CAFjFpReUq1=ygL8x5Rv1J5qJ9r+2J7Prtt1vC8eJhOe6cePpSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Sorry for the trouble. Thanks Robert for fixing it.

On Wed, Feb 10, 2016 at 2:12 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Tue, Feb 9, 2016 at 3:10 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Robert Haas <rhaas(at)postgresql(dot)org> writes:
> >> postgres_fdw: Push down joins to remote servers.
> >
> > The buildfarm is not very impressed with this patch.
>
> Well, I guess that's why we have regression tests. It looks like that
> test case introduces a dependency on particular CTID values that
> wasn't there before. That doesn't seem like a very good idea; I'll
> remove that test.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company