pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Etsuro Fujita <efujita@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: Perform the (FINAL, NULL) upperrel operations remo
Date: Tue, 02 Apr 2019 11:33:33 +0000
Message-ID: <E1hBHfZ-0000JU-Je@gemulon.postgresql.org> (raw)

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



Message-ID: <E1hBHfZ-0000JU-Je@gemulon.postgresql.org>
Permalink:  ../E1hBHfZ-0000JU-Je@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hBHfZ-0000JU-Je@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: efujita@postgresql.org
  Subject: Re: pgsql: postgres_fdw: Perform the (FINAL, NULL) upperrel operations remo
  In-Reply-To: <E1hBHfZ-0000JU-Je@gemulon.postgresql.org>
  References: <E1hBHfZ-0000JU-Je@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox