File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ pglogical_receiver_main(Datum main_arg)
251
251
ConnStatusType status ;
252
252
XLogRecPtr originStartPos = InvalidXLogRecPtr ;
253
253
int timeline ;
254
+ bool newTimeline = false;
254
255
255
256
/*
256
257
* Determine when and how we should open replication slot.
@@ -282,6 +283,7 @@ pglogical_receiver_main(Datum main_arg)
282
283
PQclear (res );
283
284
resetPQExpBuffer (query );
284
285
timeline = Mtm -> nodes [nodeId - 1 ].timeline ;
286
+ newTimeline = true;
285
287
}
286
288
/* My original assumption was that we can perfrom recovery only fromm existed slot,
287
289
* but unfortunately looks like slots can "disapear" together with WAL-sender.
@@ -311,7 +313,7 @@ pglogical_receiver_main(Datum main_arg)
311
313
originStartPos = Mtm -> nodes [nodeId - 1 ].restartLsn ;
312
314
MTM_LOG1 ("Restart replication from node %d from position %lx" , nodeId , originStartPos );
313
315
}
314
- if (originStartPos == InvalidXLogRecPtr ) {
316
+ if (originStartPos == InvalidXLogRecPtr && ! newTimeline ) {
315
317
StartTransactionCommand ();
316
318
originName = psprintf (MULTIMASTER_SLOT_PATTERN , nodeId );
317
319
originId = replorigin_by_name (originName , true);
You can’t perform that action at this time.
0 commit comments