Skip to content

Commit

Permalink
fix(PITR): compare TargetLSN with backup EndLSN instead of BeginLSN (#56
Browse files Browse the repository at this point in the history
)

Closes #6536

Signed-off-by: Marco Nenciarini <[email protected]>
  • Loading branch information
mnencia authored Jan 16, 2025
1 parent c147262 commit 018944b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (catalog *Catalog) findClosestBackupFromTargetLSN(
if (strconv.Itoa(barmanBackup.TimeLine) == targetTLI ||
// if targetTLI is not an integer, it will be ignored actually
currentTLIRegex.MatchString(targetTLI)) &&
types.LSN(barmanBackup.BeginLSN).Less(targetLSN) {
types.LSN(barmanBackup.EndLSN).Less(targetLSN) {
return &catalog.List[i], nil
}
}
Expand Down

0 comments on commit 018944b

Please sign in to comment.