pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: postgres_fdw: Fix join push down with extensions
2+ messages / 1 participants
[nested] [flat]

* pgsql: postgres_fdw: Fix join push down with extensions
@ 2017-04-25 02:50  Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2017-04-25 02:50 UTC (permalink / raw)
  To: pgsql-committers

postgres_fdw: Fix join push down with extensions

Objects in an extension are shippable to a foreign server if the
extension is part of the foreign server definition's shippable
extensions list.  But this was not properly considered in some cases
when checking whether a join condition can be pushed to a foreign server
and the join condition uses an object from a shippable extension.  So
the join would never be pushed down in those cases.

So, the list of extensions needs to be made available in fpinfo of the
relation being considered to be pushed down before any expressions are
assessed for being shippable.  Fix foreign_join_ok() to do that for a
join relation.

The code to save FDW options in fpinfo is scattered at multiple places.
Bring all of that together into functions apply_server_options(),
apply_table_options(), and merge_fdw_options().

David Rowley and Ashutosh Bapat, per report from David Rowley

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/332bec1e6096679b04ec9717beb44a858495260f

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out |  29 ++++
contrib/postgres_fdw/postgres_fdw.c            | 195 ++++++++++++++++---------
contrib/postgres_fdw/sql/postgres_fdw.sql      |   8 +
3 files changed, 160 insertions(+), 72 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: postgres_fdw: Fix join push down with extensions
@ 2017-04-26 13:15  Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2017-04-26 13:15 UTC (permalink / raw)
  To: pgsql-committers

postgres_fdw: Fix join push down with extensions

Objects in an extension are shippable to a foreign server if the
extension is part of the foreign server definition's shippable
extensions list.  But this was not properly considered in some cases
when checking whether a join condition can be pushed to a foreign server
and the join condition uses an object from a shippable extension.  So
the join would never be pushed down in those cases.

So, the list of extensions needs to be made available in fpinfo of the
relation being considered to be pushed down before any expressions are
assessed for being shippable.  Fix foreign_join_ok() to do that for a
join relation.

David Rowley and Ashutosh Bapat, per report from David Rowley

reduced version of patch 332bec1e6096679b04ec9717beb44a858495260f for
backpatch to 9.6, first release with join push down

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/86e640a6941b956d05c0380b754a92050f06bf43

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 29 ++++++++++++++++++++++++++
contrib/postgres_fdw/postgres_fdw.c            | 12 ++++++++---
contrib/postgres_fdw/sql/postgres_fdw.sql      |  8 +++++++
3 files changed, 46 insertions(+), 3 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-04-26 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 02:50 pgsql: postgres_fdw: Fix join push down with extensions Peter Eisentraut <peter_e@gmx.net>
2017-04-26 13:15 pgsql: postgres_fdw: Fix join push down with extensions Peter Eisentraut <peter_e@gmx.net>

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