|
38 | 38 | #include"access/xlog.h"
|
39 | 39 | #include"access/xloginsert.h"
|
40 | 40 | #include"access/xlogutils.h"
|
| 41 | +#include"access/xtm.h" |
41 | 42 | #include"miscadmin.h"
|
42 | 43 | #include"pgstat.h"
|
43 | 44 | #include"pg_trace.h"
|
@@ -87,6 +88,12 @@ static SlruCtlData ClogCtlData;
|
87 | 88 |
|
88 | 89 | #defineClogCtl (&ClogCtlData)
|
89 | 90 |
|
| 91 | +void |
| 92 | +TransactionIdSetTreeStatus(TransactionIdxid,intnsubxids, |
| 93 | +TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn) |
| 94 | +{ |
| 95 | +returnTM->SetTransactionStatus(xid,nsubxids,subxids,status,lsn); |
| 96 | +} |
90 | 97 |
|
91 | 98 | staticintZeroCLOGPage(intpageno,boolwriteXlog);
|
92 | 99 | staticboolCLOGPagePrecedes(intpage1,intpage2);
|
@@ -160,7 +167,7 @@ static void TransactionIdSetPageStatusInternal(TransactionId xid, int nsubxids,
|
160 | 167 | * cache yet.
|
161 | 168 | */
|
162 | 169 | void
|
163 |
| -TransactionIdSetTreeStatus(TransactionIdxid,intnsubxids, |
| 170 | +PgTransactionIdSetTreeStatus(TransactionIdxid,intnsubxids, |
164 | 171 | TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn)
|
165 | 172 | {
|
166 | 173 | intpageno=TransactionIdToPage(xid);/* get page of parent */
|
@@ -594,10 +601,10 @@ TransactionIdSetStatusBit(TransactionId xid, XidStatus status, XLogRecPtr lsn, i
|
594 | 601 | * Current state change should be from 0 or subcommitted to target state
|
595 | 602 | * or we should already be there when replaying changes during recovery.
|
596 | 603 | */
|
597 |
| -Assert(curval==0|| |
598 |
| - (curval==TRANSACTION_STATUS_SUB_COMMITTED&& |
599 |
| -status!=TRANSACTION_STATUS_IN_PROGRESS)|| |
600 |
| -curval==status); |
| 604 | +/*Assert(curval == 0 || */ |
| 605 | +/* (curval == TRANSACTION_STATUS_SUB_COMMITTED && */ |
| 606 | +/*status != TRANSACTION_STATUS_IN_PROGRESS) || */ |
| 607 | +/* curval == status); */ |
601 | 608 |
|
602 | 609 | /* note this assumes exclusive access to the clog page */
|
603 | 610 | byteval=*byteptr;
|
@@ -639,6 +646,12 @@ TransactionIdSetStatusBit(TransactionId xid, XidStatus status, XLogRecPtr lsn, i
|
639 | 646 | */
|
640 | 647 | XidStatus
|
641 | 648 | TransactionIdGetStatus(TransactionIdxid,XLogRecPtr*lsn)
|
| 649 | +{ |
| 650 | +returnTM->GetTransactionStatus(xid,lsn); |
| 651 | +} |
| 652 | + |
| 653 | +XidStatus |
| 654 | +PgTransactionIdGetStatus(TransactionIdxid,XLogRecPtr*lsn) |
642 | 655 | {
|
643 | 656 | intpageno=TransactionIdToPage(xid);
|
644 | 657 | intbyteno=TransactionIdToByte(xid);
|
|