aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHashjoin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeHashjoin.c')
-rw-r--r--src/backend/executor/nodeHashjoin.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index 67c717910f5..c901a809236 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -454,7 +454,26 @@ ExecHashJoinImpl(PlanState *pstate, bool parallel)
if (joinqual == NULL || ExecQual(joinqual, econtext))
{
node->hj_MatchedOuter = true;
- HeapTupleHeaderSetMatch(HJTUPLE_MINTUPLE(node->hj_CurTuple));
+
+ if (parallel)
+ {
+ /*
+ * Full/right outer joins are currently not supported
+ * for parallel joins, so we don't need to set the
+ * match bit. Experiments show that it's worth
+ * avoiding the shared memory traffic on large
+ * systems.
+ */
+ Assert(!HJ_FILL_INNER(node));
+ }
+ else
+ {
+ /*
+ * This is really only needed if HJ_FILL_INNER(node),
+ * but we'll avoid the branch and just set it always.
+ */
+ HeapTupleHeaderSetMatch(HJTUPLE_MINTUPLE(node->hj_CurTuple));
+ }
/* In an antijoin, we never return a matched tuple */
if (node->js.jointype == JOIN_ANTI)