diff options
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 537845cada7..fbf2d34eef9 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5433,6 +5433,14 @@ StartupXLOG(void) */ if (!XLogRecPtrIsInvalid(missingContrecPtr)) { + /* + * We should only have a missingContrecPtr if we're not switching to + * a new timeline. When a timeline switch occurs, WAL is copied from + * the old timeline to the new only up to the end of the last complete + * record, so there can't be an incomplete WAL record that we need to + * disregard. + */ + Assert(newTLI == endOfRecoveryInfo->lastRecTLI); Assert(!XLogRecPtrIsInvalid(abortedRecPtr)); EndOfLog = missingContrecPtr; } |