You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Delay reading timeline history file until it's fetched from master.
Streaming replication can fetch any missing timeline history files from themaster, but recovery would read the timeline history file for the targettimeline before reading the checkpoint record, and before walreceiver hashad a chance to fetch it from the master. Delay reading it, and the sanitychecks involving timeline history, until after reading the checkpointrecord.There is at least one scenario where this makes a difference: if you takea base backup from a standby server right after a timeline switch, theWAL segment containing the initial checkpoint record will begin with anolder timeline ID. Without the timeline history file, recovering that filewill fail as the older timeline ID is not recognized to be an ancestor ofthe target timeline. If you try to recover from such a backup, using onlystreaming replication to fetch the WAL, this patch is required for that towork.
(errmsg("requested timeline %u is not a child of this server's history",
5302
-
recoveryTargetTLI),
5303
-
errdetail("Latest checkpoint is at %X/%X on timeline %u, but in the history of the requested timeline, the server forked off from that timeline at %X/%X",
5304
-
(uint32) (ControlFile->checkPoint >>32),
5305
-
(uint32)ControlFile->checkPoint,
5306
-
ControlFile->checkPointCopy.ThisTimeLineID,
5307
-
(uint32) (switchpoint >>32),
5308
-
(uint32)switchpoint)));
5309
-
}
5310
-
5311
-
/*
5312
-
* The min recovery point should be part of the requested timeline's
5313
-
* history, too.
5314
-
*/
5315
-
if (!XLogRecPtrIsInvalid(ControlFile->minRecoveryPoint)&&
(errmsg("requested timeline %u is not a child of this server's history",
5441
+
recoveryTargetTLI),
5442
+
errdetail("Latest checkpoint is at %X/%X on timeline %u, but in the history of the requested timeline, the server forked off from that timeline at %X/%X",
5443
+
(uint32) (ControlFile->checkPoint >>32),
5444
+
(uint32)ControlFile->checkPoint,
5445
+
ControlFile->checkPointCopy.ThisTimeLineID,
5446
+
(uint32) (switchpoint >>32),
5447
+
(uint32)switchpoint)));
5448
+
}
5449
+
5450
+
/*
5451
+
* The min recovery point should be part of the requested timeline's
5452
+
* history, too.
5453
+
*/
5454
+
if (!XLogRecPtrIsInvalid(ControlFile->minRecoveryPoint)&&