Skip to content

Commit 5a72566

Browse files
knizhnikkelvich
authored andcommitted
Use origin LSN for recovery
1 parent d0d17dc commit 5a72566

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
MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shutdown)
24312431
{
2432+
int i;
24322433
bool recovery = 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
return REPLMODE_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
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