Content-Length: 276994 | pFad | http://github.com/postgrespro/postgres_cluster/commit/20afa29e99a293c53cb0b543251e792ebd491f08

1B Fix bug in MtmFinishPreparedTransaction · postgrespro/postgres_cluster@20afa29 · GitHub
Skip to content

Commit 20afa29

Browse files
committed
Fix bug in MtmFinishPreparedTransaction
1 parent 951eeb9 commit 20afa29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/mmts/multimaster.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,14 +2801,14 @@ void MtmRollbackPreparedTransaction(char const* gid)
28012801

28022802
void MtmFinishPreparedTransaction(MtmTransState* ts, bool commit)
28032803
{
2804-
if (Mtm->nodes[MtmNodeId-1].origenId == InvalidRepOriginId) {
2805-
/* This dummy origen is used for local commits/aborts which should not be replicated */
2806-
Mtm->nodes[MtmNodeId-1].origenId = replorigen_create(psprintf(MULTIMASTER_SLOT_PATTERN, MtmNodeId));
2807-
}
28082804
Assert(ts->votingCompleted);
28092805
Assert(!IsTransactionState());
28102806
MtmResetTransaction();
28112807
StartTransactionCommand();
2808+
if (Mtm->nodes[MtmNodeId-1].origenId == InvalidRepOriginId) {
2809+
/* This dummy origen is used for local commits/aborts which should not be replicated */
2810+
Mtm->nodes[MtmNodeId-1].origenId = replorigen_create(psprintf(MULTIMASTER_SLOT_PATTERN, MtmNodeId));
2811+
}
28122812
MtmBeginSession(MtmNodeId);
28132813
MtmSetCurrentTransactionCSN(ts->csn);
28142814
MtmSetCurrentTransactionGID(ts->gid);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/20afa29e99a293c53cb0b543251e792ebd491f08

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy