From fbe5a3fb73102c2cfec11aaaa4a67943f4474383 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 28 Jan 2016 14:05:36 -0500 Subject: Only try to push down foreign joins if the user mapping OIDs match. Previously, the foreign join pushdown infrastructure left the question of security entirely up to individual FDWs, but it would be easy for a foreign data wrapper to inadvertently open up subtle security holes that way. So, make it the core code's job to determine which user mapping OID is relevant, and don't attempt join pushdown unless it's the same for all relevant relations. Per a suggestion from Tom Lane. Shigeru Hanada and Ashutosh Bapat, reviewed by Etsuro Fujita and KaiGai Kohei, with some further changes by me. --- src/backend/executor/execParallel.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/executor/execParallel.c') diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c index c30b3485dd5..29e450a571c 100644 --- a/src/backend/executor/execParallel.c +++ b/src/backend/executor/execParallel.c @@ -143,6 +143,7 @@ ExecSerializePlan(Plan *plan, EState *estate) pstmt->relationOids = NIL; pstmt->invalItems = NIL; /* workers can't replan anyway... */ pstmt->hasRowSecurity = false; + pstmt->hasForeignJoin = false; /* Return serialized copy of our dummy PlannedStmt. */ return nodeToString(pstmt); -- cgit v1.2.3