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)
13811381 * callbacks will release the locks the transaction held.
13821382 */
13831383 if (isCommit )
1384+ {
13841385 RecordTransactionCommitPrepared (xid ,
13851386 hdr -> nsubxacts , children ,
13861387 hdr -> ncommitrels , commitrels ,
13871388 hdr -> ninvalmsgs , invalmsgs ,
13881389 hdr -> initfileinval );
1390+ CallXactCallbacks (XACT_EVENT_COMMIT_PREPARED );
1391+ }
13891392 else
1393+ {
13901394 RecordTransactionAbortPrepared (xid ,
13911395 hdr -> nsubxacts , children ,
13921396 hdr -> nabortrels , abortrels );
1397+ CallXactCallbacks (XACT_EVENT_ABORT_PREPARED );
1398+ }
13931399
13941400 ProcArrayRemove (proc , latestXid );
13951401
@@ -2150,3 +2156,12 @@ RecordTransactionAbortPrepared(TransactionId xid,
21502156 */
21512157 SyncRepWaitForLSN (recptr );
21522158}
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