diff options
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r-- | src/backend/executor/nodeModifyTable.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 1ac65172e44..f8e71ef1cc1 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -2967,21 +2967,20 @@ lmerge_matched: */ /* - * If cpUpdateRetrySlot is set, ExecCrossPartitionUpdate() - * must have detected that the tuple was concurrently - * updated, so we restart the search for an appropriate - * WHEN MATCHED clause to process the updated tuple. + * During an UPDATE, if cpUpdateRetrySlot is set, then + * ExecCrossPartitionUpdate() must have detected that the + * tuple was concurrently updated, so we restart the + * search for an appropriate WHEN MATCHED clause to + * process the updated tuple. * * In this case, ExecDelete() would already have performed * EvalPlanQual() on the latest version of the tuple, * which in turn would already have been loaded into * ri_oldTupleSlot, so no need to do either of those * things. - * - * XXX why do we not check the WHEN NOT MATCHED list in - * this case? */ - if (!TupIsNull(context->cpUpdateRetrySlot)) + if (commandType == CMD_UPDATE && + !TupIsNull(context->cpUpdateRetrySlot)) goto lmerge_matched; /* |