|
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"pg_trace.h"
|
43 | 44 |
|
@@ -79,6 +80,12 @@ static SlruCtlData ClogCtlData;
|
79 | 80 |
|
80 | 81 | #defineClogCtl (&ClogCtlData)
|
81 | 82 |
|
| 83 | +void |
| 84 | +TransactionIdSetTreeStatus(TransactionIdxid,intnsubxids, |
| 85 | +TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn) |
| 86 | +{ |
| 87 | +returnTM->SetTransactionStatus(xid,nsubxids,subxids,status,lsn); |
| 88 | +} |
82 | 89 |
|
83 | 90 | staticintZeroCLOGPage(intpageno,boolwriteXlog);
|
84 | 91 | staticboolCLOGPagePrecedes(intpage1,intpage2);
|
@@ -146,7 +153,7 @@ static void set_status_by_pages(int nsubxids, TransactionId *subxids,
|
146 | 153 | * cache yet.
|
147 | 154 | */
|
148 | 155 | void
|
149 |
| -TransactionIdSetTreeStatus(TransactionIdxid,intnsubxids, |
| 156 | +PgTransactionIdSetTreeStatus(TransactionIdxid,intnsubxids, |
150 | 157 | TransactionId*subxids,XidStatusstatus,XLogRecPtrlsn)
|
151 | 158 | {
|
152 | 159 | intpageno=TransactionIdToPage(xid);/* get page of parent */
|
@@ -352,10 +359,10 @@ TransactionIdSetStatusBit(TransactionId xid, XidStatus status, XLogRecPtr lsn, i
|
352 | 359 | * Current state change should be from 0 or subcommitted to target state
|
353 | 360 | * or we should already be there when replaying changes during recovery.
|
354 | 361 | */
|
355 |
| -Assert(curval==0|| |
356 |
| - (curval==TRANSACTION_STATUS_SUB_COMMITTED&& |
357 |
| -status!=TRANSACTION_STATUS_IN_PROGRESS)|| |
358 |
| -curval==status); |
| 362 | +/*Assert(curval == 0 || */ |
| 363 | +/* (curval == TRANSACTION_STATUS_SUB_COMMITTED && */ |
| 364 | +/*status != TRANSACTION_STATUS_IN_PROGRESS) || */ |
| 365 | +/* curval == status); */ |
359 | 366 |
|
360 | 367 | /* note this assumes exclusive access to the clog page */
|
361 | 368 | byteval=*byteptr;
|
@@ -397,6 +404,12 @@ TransactionIdSetStatusBit(TransactionId xid, XidStatus status, XLogRecPtr lsn, i
|
397 | 404 | */
|
398 | 405 | XidStatus
|
399 | 406 | TransactionIdGetStatus(TransactionIdxid,XLogRecPtr*lsn)
|
| 407 | +{ |
| 408 | +returnTM->GetTransactionStatus(xid,lsn); |
| 409 | +} |
| 410 | + |
| 411 | +XidStatus |
| 412 | +PgTransactionIdGetStatus(TransactionIdxid,XLogRecPtr*lsn) |
400 | 413 | {
|
401 | 414 | intpageno=TransactionIdToPage(xid);
|
402 | 415 | intbyteno=TransactionIdToByte(xid);
|
|