Skip to content

Commit

Permalink
Pick base backup based on finish_time instead of start_time
Browse files Browse the repository at this point in the history
  • Loading branch information
simonklb authored and Zash committed Dec 3, 2024
1 parent aa216f0 commit 7110177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgres-appliance/bootstrap/clone_with_wale.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def choose_backup(backup_list, recovery_target_time):

match_timestamp = match = None
for backup in backup_list:
last_modified = parse(backup['start_time' if os.getenv('USE_WALG_RESTORE') == 'true' else 'last_modified'])
last_modified = parse(backup['finish_time' if os.getenv('USE_WALG_RESTORE') == 'true' else 'last_modified'])
if last_modified < recovery_target_time:
if match is None or last_modified > match_timestamp:
match = backup
Expand Down

0 comments on commit 7110177

Please sign in to comment.