Repair some flakiness in CheckTargetForConflictsIn.

Robert Haas <rhaas@postgresql.org>

Commit: 632f0faa7c975e8984ce0f1d6b631478e41a96c2
Author: Robert Haas <rhaas@postgresql.org>
Date: 2011-04-05T19:17:25Z
Releases: 9.1.0
Repair some flakiness in CheckTargetForConflictsIn.

When we release and reacquire SerializableXactHashLock, we must recheck
whether an R/W conflict still needs to be flagged, because it could have
changed under us in the meantime.  And when we release the partition
lock, we must re-walk the list of predicate locks from the beginning,
because our pointer could get invalidated under us.

Bug report #5952 by Yamamoto Takashi.  Patch by Kevin Grittner.

Files

PathChange+/−
src/backend/storage/lmgr/predicate.c modified +24 −1