aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-04-20 17:48:55 -0400
committerRobert Haas <rhaas@postgresql.org>2016-04-20 17:48:55 -0400
commit9c75e1a36b6b2f3ad9f76ae661f42586c92c6f7c (patch)
treeb0e710aea7791c8d17a4a0d154e9fd8faf70c214
parentcfb863f20a2a005ac89f393265d4c37ad9baab41 (diff)
downloadpostgresql-9c75e1a36b6b2f3ad9f76ae661f42586c92c6f7c.tar.gz
postgresql-9c75e1a36b6b2f3ad9f76ae661f42586c92c6f7c.zip
Forbid parallel Hash Right Join or Hash Full Join.
That won't work. You'll get bogus null-extended rows. Mithun Cy
-rw-r--r--src/backend/optimizer/path/joinpath.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c
index 41b60d01d37..f8e02b9c45d 100644
--- a/src/backend/optimizer/path/joinpath.c
+++ b/src/backend/optimizer/path/joinpath.c
@@ -1450,10 +1450,14 @@ hash_inner_and_outer(PlannerInfo *root,
* If the joinrel is parallel-safe, we may be able to consider a
* partial hash join. However, we can't handle JOIN_UNIQUE_OUTER,
* because the outer path will be partial, and therefore we won't be
- * able to properly guarantee uniqueness. Also, the resulting path
- * must not be parameterized.
+ * able to properly guarantee uniqueness. Similarly, we can't handle
+ * JOIN_FULL and JOIN_RIGHT, because they can produce false null
+ * extended rows. Also, the resulting path must not be parameterized.
*/
- if (joinrel->consider_parallel && jointype != JOIN_UNIQUE_OUTER &&
+ if (joinrel->consider_parallel &&
+ jointype != JOIN_UNIQUE_OUTER &&
+ jointype != JOIN_FULL &&
+ jointype != JOIN_RIGHT &&
outerrel->partial_pathlist != NIL &&
bms_is_empty(joinrel->lateral_relids))
{