Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5a72566

Browse files
knizhnikkelvich
authored andcommitted
Use origin LSN for recovery
1 parentd0d17dc commit5a72566

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎multimaster.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,7 @@ void MtmReceiverStarted(int nodeId)
24292429
*/
24302430
MtmReplicationModeMtmGetReplicationMode(intnodeId,sig_atomic_tvolatile*shutdown)
24312431
{
2432+
inti;
24322433
boolrecovery= false;
24332434

24342435
while (Mtm->status!=MTM_CONNECTED&&Mtm->status!=MTM_ONLINE)
@@ -2448,6 +2449,9 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shut
24482449
Mtm->recoveryCount+=1;
24492450
Mtm->pglogicalNodeMask=0;
24502451
FinishAllPreparedTransactions(false);
2452+
for (i=0;i<Mtm->nAllNodes;i++) {
2453+
Mtm->nodes[i].restartLsn=0;
2454+
}
24512455
returnREPLMODE_RECOVERY;
24522456
}
24532457
}

‎multimaster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ typedef struct
145145
intreceiverPid;
146146
XLogRecPtrflushPos;
147147
csn_toldestSnapshot;/* Oldest snapshot used by active transactions at this node */
148+
XLogRecPtrrestartLsn;
148149
}MtmNodeInfo;
149150

150151
typedefstructMtmTransState

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp