Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb799b70

Browse files
committed
Merge branch 'issue_106'
2 parents8b15753 +738013f commitb799b70

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎src/delete.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ do_retention_internal(parray *backup_list, parray *to_keep_list, parray *to_purg
259259
{
260260

261261
boolredundancy_keep= false;
262+
time_tbackup_time=0;
262263
pgBackup*backup= (pgBackup*)parray_get(backup_list, (size_t)i);
263264

264265
/* check if backup`s FULL ancestor is in redundancy list */
@@ -280,10 +281,16 @@ do_retention_internal(parray *backup_list, parray *to_keep_list, parray *to_purg
280281
cur_full_backup_num++;
281282
}
282283

283-
/*Check if backup in needed by retention policy
284-
*TODO: consider that ERROR backup most likely to have recovery_time == 0
284+
/*Invalid and running backups most likely to have recovery_time == 0,
285+
*so in this case use start_time instead.
285286
*/
286-
if ((days_threshold==0|| (days_threshold>backup->recovery_time))&&
287+
if (backup->recovery_time)
288+
backup_time=backup->recovery_time;
289+
else
290+
backup_time=backup->start_time;
291+
292+
/* Check if backup in needed by retention policy */
293+
if ((days_threshold==0|| (days_threshold>backup_time))&&
287294
(instance_config.retention_redundancy==0|| !redundancy_keep))
288295
{
289296
/* This backup is not guarded by retention

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp