Skip to content

Commit 00ce713

Browse files
committed
Do no report meaningless timestamp when deleting backup without valid "recovery-time" attribute. Reported by Roman Zharkov
1 parent 316f0d2 commit 00ce713

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/delete.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,10 @@ delete_backup_files(pgBackup *backup)
745745
return;
746746
}
747747

748-
time2iso(timestamp, lengthof(timestamp), backup->recovery_time, false);
748+
if (backup->recovery_time)
749+
time2iso(timestamp, lengthof(timestamp), backup->recovery_time, false);
750+
else
751+
time2iso(timestamp, lengthof(timestamp), backup->start_time, false);
749752

750753
elog(INFO, "Delete: %s %s",
751754
base36enc(backup->start_time), timestamp);

0 commit comments

Comments
 (0)