Skip to content

Commit 597d46a

Browse files
committed
Use origin LSN for recovery
1 parent 1e73a04 commit 597d46a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

contrib/mmts/multimaster.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,7 @@ void MtmReceiverStarted(int nodeId)
24072407
*/
24082408
MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shutdown)
24092409
{
2410+
int i;
24102411
bool recovery = false;
24112412

24122413
while (Mtm->status != MTM_CONNECTED && Mtm->status != MTM_ONLINE)
@@ -2426,6 +2427,9 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shut
24262427
Mtm->recoveryCount += 1;
24272428
Mtm->pglogicalNodeMask = 0;
24282429
FinishAllPreparedTransactions(false);
2430+
for (i = 0; i < Mtm->nAllNodes; i++) {
2431+
Mtm->nodes[i].restartLsn = 0;
2432+
}
24292433
return REPLMODE_RECOVERY;
24302434
}
24312435
}

contrib/mmts/multimaster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ typedef struct
145145
int receiverPid;
146146
XLogRecPtr flushPos;
147147
csn_t oldestSnapshot; /* Oldest snapshot used by active transactions at this node */
148+
XLogRecPtr restartLsn;
148149
} MtmNodeInfo;
149150

150151
typedef struct MtmTransState

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy