Content-Length: 316731 | pFad | http://github.com/postgrespro/postgres_cluster/commit/dbac09ddd2301c4fdd162c77a5ec2faf7c9621b9

1A Merge branch 'master' into more_tests · postgrespro/postgres_cluster@dbac09d · GitHub
Skip to content

Commit dbac09d

Browse files
committed
Merge branch 'master' into more_tests
2 parents c820e3c + cab8515 commit dbac09d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

contrib/mmts/multimaster.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,7 @@ static void MtmInitialize()
20812081
Mtm->nodes[i].origenId = InvalidRepOriginId;
20822082
Mtm->nodes[i].timeline = 0;
20832083
}
2084+
Mtm->nodes[MtmNodeId-1].origenId = DoNotReplicateId;
20842085
PGSemaphoreCreate(&Mtm->sendSemaphore);
20852086
PGSemaphoreReset(&Mtm->sendSemaphore);
20862087
SpinLockInit(&Mtm->spinlock);
@@ -2807,10 +2808,12 @@ void MtmFinishPreparedTransaction(MtmTransState* ts, bool commit)
28072808
Assert(!IsTransactionState());
28082809
MtmResetTransaction();
28092810
StartTransactionCommand();
2811+
#if 0
28102812
if (Mtm->nodes[MtmNodeId-1].origenId == InvalidRepOriginId) {
28112813
/* This dummy origen is used for local commits/aborts which should not be replicated */
28122814
Mtm->nodes[MtmNodeId-1].origenId = replorigen_create(psprintf(MULTIMASTER_SLOT_PATTERN, MtmNodeId));
28132815
}
2816+
#endif
28142817
MtmBeginSession(MtmNodeId);
28152818
MtmSetCurrentTransactionCSN(ts->csn);
28162819
MtmSetCurrentTransactionGID(ts->gid);

src/backend/access/transam/twophase.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,10 @@ EndPrepare(GlobalTransaction gxact)
10671067
START_CRIT_SECTION();
10681068
xl_xinfo.xinfo = 0;
10691069
/* dump transaction origen information */
1070-
if (replorigen_session_origen != InvalidRepOriginId)
1070+
if (replorigen)
10711071
{
10721072
xl_xinfo.xinfo |= XACT_XINFO_HAS_ORIGIN;
1073-
Assert(replorigen_session_origen_lsn != 0);
1073+
Assert(replorigen_session_origen_lsn != InvalidXLogRecPtr);
10741074
xl_origen.origen_lsn = replorigen_session_origen_lsn;
10751075
xl_origen.origen_timestamp = replorigen_session_origen_timestamp;
10761076
}

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/dbac09ddd2301c4fdd162c77a5ec2faf7c9621b9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy