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

Commitf2c0241

Browse files
knizhnikkelvich
authored andcommitted
Use default LSN for new timeline
1 parent86d25e9 commitf2c0241

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎pglogical_receiver.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ pglogical_receiver_main(Datum main_arg)
251251
ConnStatusTypestatus;
252252
XLogRecPtroriginStartPos=InvalidXLogRecPtr;
253253
inttimeline;
254+
boolnewTimeline= false;
254255

255256
/*
256257
* Determine when and how we should open replication slot.
@@ -282,6 +283,7 @@ pglogical_receiver_main(Datum main_arg)
282283
PQclear(res);
283284
resetPQExpBuffer(query);
284285
timeline=Mtm->nodes[nodeId-1].timeline;
286+
newTimeline= true;
285287
}
286288
/* My original assumption was that we can perfrom recovery only fromm existed slot,
287289
* but unfortunately looks like slots can "disapear" together with WAL-sender.
@@ -311,7 +313,7 @@ pglogical_receiver_main(Datum main_arg)
311313
originStartPos=Mtm->nodes[nodeId-1].restartLsn;
312314
MTM_LOG1("Restart replication from node %d from position %lx",nodeId,originStartPos);
313315
}
314-
if (originStartPos==InvalidXLogRecPtr) {
316+
if (originStartPos==InvalidXLogRecPtr&& !newTimeline) {
315317
StartTransactionCommand();
316318
originName=psprintf(MULTIMASTER_SLOT_PATTERN,nodeId);
317319
originId=replorigin_by_name(originName, true);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp