pgsql: postgres_fdw: Perform the (FINAL, NULL) upperrel operations remo

From: Etsuro Fujita <efujita(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: postgres_fdw: Perform the (FINAL, NULL) upperrel operations remo
Date: 2019-04-02 11:33:33
Message-ID: E1hBHfZ-0000JU-Je@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

postgres_fdw: Perform the (FINAL, NULL) upperrel operations remotely.

The upper-planner pathification allows FDWs to arrange to push down
different types of upper-stage operations to the remote side. This
commit teaches postgres_fdw to do it for the (FINAL, NULL) upperrel,
which is responsible for doing LockRows, LIMIT, and/or ModifyTable.
This provides the ability for postgres_fdw to handle SELECT commands
so that it 1) skips the LockRows step (if any) (note that this is
safe since it performs early locking) and 2) pushes down the LIMIT
and/or OFFSET restrictions (if any) to the remote side. This doesn't
handle the INSERT/UPDATE/DELETE cases.

Author: Etsuro Fujita
Reviewed-By: Antonin Houska and Jeff Janes
Discussion: https://postgr.es/m/87pnz1aby9.fsf@news-spur.riddles.org.uk

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d50d172e517c1d2aabff3ceb3ad3113b909c5017

Modified Files
--------------
contrib/postgres_fdw/deparse.c | 37 +-
contrib/postgres_fdw/expected/postgres_fdw.out | 620 ++++++++++---------------
contrib/postgres_fdw/postgres_fdw.c | 342 +++++++++++++-
contrib/postgres_fdw/postgres_fdw.h | 3 +-
contrib/postgres_fdw/sql/postgres_fdw.sql | 16 +-
src/backend/optimizer/plan/planner.c | 10 +-
src/include/nodes/pathnodes.h | 18 +
7 files changed, 656 insertions(+), 390 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2019-04-02 16:36:33 pgsql: Add support for partial TOAST decompression
Previous Message Etsuro Fujita 2019-04-02 10:57:20 pgsql: Refactor create_limit_path() to share cost adjustment code with