aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/executor/nodeHash.c6
-rw-r--r--src/backend/executor/nodeHashjoin.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index ab766b84dc9..94441f807e6 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -724,6 +724,9 @@ ExecHashIncreaseNumBatches(HashJoinTable hashtable)
/* next tuple in this chunk */
idx += MAXALIGN(hashTupleSize);
+
+ /* allow this loop to be cancellable */
+ CHECK_FOR_INTERRUPTS();
}
/* we're done with this chunk - free it and proceed to the next one */
@@ -1602,6 +1605,9 @@ ExecHashRemoveNextSkewBucket(HashJoinTable hashtable)
}
hashTuple = nextHashTuple;
+
+ /* allow this loop to be cancellable */
+ CHECK_FOR_INTERRUPTS();
}
/*
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index 1d78cdf98d4..7ca26392297 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -912,6 +912,13 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
MinimalTuple tuple;
/*
+ * We check for interrupts here because this is typically taken as an
+ * alternative code path to an ExecProcNode() call, which would include
+ * such a check.
+ */
+ CHECK_FOR_INTERRUPTS();
+
+ /*
* Since both the hash value and the MinimalTuple length word are uint32,
* we can read them both in one BufFileRead() call without any type
* cheating.