File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/backend/access/transam Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1381,15 +1381,21 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
1381
1381
* callbacks will release the locks the transaction held.
1382
1382
*/
1383
1383
if (isCommit )
1384
+ {
1384
1385
RecordTransactionCommitPrepared (xid ,
1385
1386
hdr -> nsubxacts , children ,
1386
1387
hdr -> ncommitrels , commitrels ,
1387
1388
hdr -> ninvalmsgs , invalmsgs ,
1388
1389
hdr -> initfileinval );
1390
+ CallXactCallbacks (XACT_EVENT_COMMIT_PREPARED );
1391
+ }
1389
1392
else
1393
+ {
1390
1394
RecordTransactionAbortPrepared (xid ,
1391
1395
hdr -> nsubxacts , children ,
1392
1396
hdr -> nabortrels , abortrels );
1397
+ CallXactCallbacks (XACT_EVENT_ABORT_PREPARED );
1398
+ }
1393
1399
1394
1400
ProcArrayRemove (proc , latestXid );
1395
1401
@@ -2150,3 +2156,12 @@ RecordTransactionAbortPrepared(TransactionId xid,
2150
2156
*/
2151
2157
SyncRepWaitForLSN (recptr );
2152
2158
}
2159
+
2160
+ /*
2161
+ * Return identified of current global transaction
2162
+ */
2163
+ const char *
2164
+ GetLockedGlobalTransactionId (void )
2165
+ {
2166
+ return MyLockedGxact ? MyLockedGxact -> gid : NULL ;
2167
+ }
You can’t perform that action at this time.
0 commit comments