postgres.git / summary / log / commit / refs

commit    9b47c67ccde6ec91219ad4aba515a48c136f9568
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Thu Jul 07 21:36:30 2011 +0000
First released in: 9.2.0, 9.1.0

    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.


src/backend/storage/lmgr/predicate.c | 5 +++-- 1 file 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); } [parent: fdf8f751e793]