diff options
Diffstat (limited to 'src/backend/access/transam/transam.c')
-rw-r--r-- | src/backend/access/transam/transam.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c index 5bcce3c2d70..b68b6ab6691 100644 --- a/src/backend/access/transam/transam.c +++ b/src/backend/access/transam/transam.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.19 1998/09/01 04:27:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.20 1998/12/15 12:45:30 vadim Exp $ * * NOTES * This file contains the high level access-method interface to the @@ -172,8 +172,12 @@ TransactionLogTest(TransactionId transactionId, /* transaction id to test */ if (!fail) { - TransactionIdStore(transactionId, &cachedTestXid); - cachedTestXidStatus = xidstatus; + /* must not cache status of running xaction !!! */ + if (xidstatus != XID_INPROGRESS) + { + TransactionIdStore(transactionId, &cachedTestXid); + cachedTestXidStatus = xidstatus; + } return (bool) (status == xidstatus); } @@ -219,11 +223,14 @@ TransactionLogUpdate(TransactionId transactionId, /* trans id to update */ status, &fail); - /* ---------------- - * update (invalidate) our single item TransactionLogTest cache. - * ---------------- - */ + /* + * update (invalidate) our single item TransactionLogTest cache. + * if (status != XID_COMMIT) + * + * What's the hell ?! Why != XID_COMMIT ?! + */ + if (status != XID_INPROGRESS) { TransactionIdStore(transactionId, &cachedTestXid); cachedTestXidStatus = status; |