diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-07-08 00:36:30 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-07-08 00:39:40 +0300 |
commit | 9b47c67ccde6ec91219ad4aba515a48c136f9568 (patch) | |
tree | 4b425e43f89728b349bd6e146924ccae882f341b | |
parent | fdf8f751e7933c7992cdabc4b8f37d25268f192e (diff) | |
download | postgresql-9b47c67ccde6ec91219ad4aba515a48c136f9568.tar.gz postgresql-9b47c67ccde6ec91219ad4aba515a48c136f9568.zip |
There's a small window wherein a transaction is committed but not yet
on the finished list, and we shouldn't flag it as a potential conflict
if so. We can also skip adding a doomed transaction to the list of
possible conflicts because we know it won't commit.
Dan Ports and Kevin Grittner.
-rw-r--r-- | src/backend/storage/lmgr/predicate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c index d93de7de904..3c3a6a9d963 100644 --- a/src/backend/storage/lmgr/predicate.c +++ b/src/backend/storage/lmgr/predicate.c @@ -1677,8 +1677,9 @@ RegisterSerializableTransactionInt(Snapshot snapshot) othersxact != NULL; othersxact = NextPredXact(othersxact)) { - if (!SxactIsOnFinishedList(othersxact) && - !SxactIsReadOnly(othersxact)) + if (!SxactIsCommitted(othersxact) + && !SxactIsDoomed(othersxact) + && !SxactIsReadOnly(othersxact)) { SetPossibleUnsafeConflict(sxact, othersxact); } |