Skip to content

Commit 859c31d

Browse files
authored
fix(PITR): compare TargetLSN with backup EndLSN instead of BeginLSN
Closes #6536 Signed-off-by: Marco Nenciarini <[email protected]>
1 parent c147262 commit 859c31d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/catalog/catalog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (catalog *Catalog) findClosestBackupFromTargetLSN(
183183
if (strconv.Itoa(barmanBackup.TimeLine) == targetTLI ||
184184
// if targetTLI is not an integer, it will be ignored actually
185185
currentTLIRegex.MatchString(targetTLI)) &&
186-
types.LSN(barmanBackup.BeginLSN).Less(targetLSN) {
186+
types.LSN(barmanBackup.EndLSN).Less(targetLSN) {
187187
return &catalog.List[i], nil
188188
}
189189
}

0 commit comments

Comments
 (0)