From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: postgres_fdw: Push down UPDATE/DELETE joins to remote servers. |
Date: | 2018-02-07 20:39:31 |
Message-ID: | E1ejWV9-0001p7-2Q@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
postgres_fdw: Push down UPDATE/DELETE joins to remote servers.
Commit 0bf3ae88af330496517722e391e7c975e6bad219 allowed direct
foreign table modification; instead of fetching each row, updating
it locally, and then pushing the modification back to the remote
side, we would instead do all the work on the remote server via a
single remote UPDATE or DELETE command. However, that commit only
enabled this optimization when join tree consisted only of the
target table.
This change allows the same optimization when an UPDATE statement
has a FROM clause or a DELETE statement has a USING clause. This
works much like ordinary foreign join pushdown, in that the tables
must be on the same remote server, relevant parts of the query
must be pushdown-safe, and so forth.
Etsuro Fujita, reviewed by Ashutosh Bapat, Rushabh Lathia, and me.
Some formatting corrections by me.
Discussion: http://postgr.es/m/5A57193A.2080003@lab.ntt.co.jp
Discussion: http://postgr.es/m/b9cee735-62f8-6c07-7528-6364ce9347d0@lab.ntt.co.jp
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1bc0100d270e5bcc980a0629b8726a32a497e788
Modified Files
--------------
contrib/postgres_fdw/deparse.c | 218 ++++++++++--
contrib/postgres_fdw/expected/postgres_fdw.out | 241 +++++++++++---
contrib/postgres_fdw/postgres_fdw.c | 438 ++++++++++++++++++++++++-
contrib/postgres_fdw/postgres_fdw.h | 2 +
contrib/postgres_fdw/sql/postgres_fdw.sql | 56 +++-
5 files changed, 863 insertions(+), 92 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2018-02-08 00:04:13 | Re: [COMMITTERS] pgsql: Rearm statement_timeout after each executed query. |
Previous Message | Peter Eisentraut | 2018-02-07 20:03:24 | pgsql: Make new triggers tests more robust |