pgsql: Allow FDWs and custom scan providers to replace joins with scans

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Allow FDWs and custom scan providers to replace joins with scans
Дата
Msg-id E1YoAWz-0001XG-Nk@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Allow FDWs and custom scan providers to replace joins with scans.

Foreign data wrappers can use this capability for so-called "join
pushdown"; that is, instead of executing two separate foreign scans
and then joining the results locally, they can generate a path which
performs the join on the remote server and then is scanned locally.
This commit does not extend postgres_fdw to take advantage of this
capability; it just provides the infrastructure.

Custom scan providers can use this in a similar way.  Previously,
it was only possible for a custom scan provider to scan a single
relation.  Now, it can scan an entire join tree, provided of course
that it knows how to produce the same results that the join would
have produced if executed normally.

KaiGai Kohei, reviewed by Shigeru Hanada, Ashutosh Bapat, and me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e7cb7ee14555cc9c5773e2c102efd6371f6f2005

Modified Files
--------------
doc/src/sgml/custom-scan.sgml           |   40 +++++++++
doc/src/sgml/fdwhandler.sgml            |   36 ++++++++
src/backend/commands/explain.c          |   15 +++-
src/backend/executor/execScan.c         |    6 ++
src/backend/executor/nodeCustom.c       |   34 +++++---
src/backend/executor/nodeForeignscan.c  |   31 ++++---
src/backend/foreign/foreign.c           |   21 +++--
src/backend/nodes/copyfuncs.c           |    5 ++
src/backend/nodes/outfuncs.c            |    5 ++
src/backend/optimizer/path/joinpath.c   |   24 +++++
src/backend/optimizer/plan/createplan.c |   83 ++++++++++++++----
src/backend/optimizer/plan/setrefs.c    |  145 ++++++++++++++++++++++++++-----
src/backend/optimizer/util/plancat.c    |    7 +-
src/backend/optimizer/util/relnode.c    |   14 +++
src/backend/utils/adt/ruleutils.c       |    4 +
src/include/foreign/fdwapi.h            |   15 ++++
src/include/nodes/plannodes.h           |   20 +++--
src/include/nodes/relation.h            |    2 +
src/include/optimizer/paths.h           |   13 +++
src/include/optimizer/planmain.h        |    1 +
20 files changed, 449 insertions(+), 72 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Copy editing of the replication origins patch.
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Deparse named arguments to use the new => operator instead of :=