diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 32bb3f9..d34ce39 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -2288,19 +2288,14 @@ EvalPlanQualFetch(EState *estate, Relation relation, int lockmode, elog(ERROR, "t_xmin is uncommitted in tuple to be updated"); /* - * If tuple is being updated by other transaction then we have to - * wait for its commit/abort, or die trying. + * If tuple is being updated by other transaction then we may wish + * to abort early with certain wait_policy types. */ if (TransactionIdIsValid(SnapshotDirty.xmax)) { ReleaseBuffer(buffer); switch (wait_policy) { - case LockWaitBlock: - XactLockTableWait(SnapshotDirty.xmax, - relation, &tuple.t_self, - XLTW_FetchUpdated); - break; case LockWaitSkip: if (!ConditionalXactLockTableWait(SnapshotDirty.xmax)) return NULL; /* skip instead of waiting */ @@ -2312,8 +2307,12 @@ EvalPlanQualFetch(EState *estate, Relation relation, int lockmode, errmsg("could not obtain lock on row in relation \"%s\"", RelationGetRelationName(relation)))); break; + case LockWaitBlock: + /* + * Drop through to lock tuple, if not ours + */ + break; } - continue; /* loop back to repeat heap_fetch */ } /*