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

Commit7f81494

Browse files
committed
minor fixes: free base36enc_dup()'s results, comments cleanup
1 parent75aa7a4 commit7f81494

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎src/delete.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int do_retention(void)
162162
if (retention_is_set&& !backup_list_is_empty)
163163
do_retention_internal(backup_list,to_keep_list,to_purge_list);
164164

165-
if (merge_expired&& !dry_run)
165+
if (merge_expired&& !dry_run&& !backup_list_is_empty)
166166
do_retention_merge(backup_list,to_keep_list,to_purge_list);
167167

168168
if (delete_expired&& !dry_run&& !backup_list_is_empty)
@@ -191,7 +191,7 @@ int do_retention(void)
191191
}
192192

193193
/* Evaluate every backup by retention policies and populate purge and keep lists.
194-
* Also for every backup printproposed action('Active' or 'Expired') according
194+
* Also for every backup printits status('Active' or 'Expired') according
195195
* to active retention policies.
196196
*/
197197
staticvoid
@@ -259,9 +259,8 @@ do_retention_internal(parray *backup_list, parray *to_keep_list, parray *to_purg
259259
* FULL CORRUPT in retention (not count toward redundancy limit)
260260
* FULL in retention
261261
* ------retention redundancy -------
262-
* PAGE4 in retention
263-
* ------retention window -----------
264262
* PAGE3 in retention
263+
* ------retention window -----------
265264
* PAGE2 out of retention
266265
* PAGE1 out of retention
267266
* FULL out of retention <- We are here
@@ -362,8 +361,8 @@ do_retention_merge(parray *backup_list, parray *to_keep_list, parray *to_purge_l
362361
intj;
363362

364363
/* IMPORTANT: we can merge to only those FULL backup, that is NOT
365-
* guarded by retention and finaltargets of suchmerges must be
366-
* incremental backup that is guarded by retention !!!
364+
* guarded by retention and finaltarget of suchmerge must be
365+
*anincremental backup that is guarded by retention !!!
367366
*
368367
* PAGE4 E
369368
* PAGE3 D
@@ -420,6 +419,7 @@ do_retention_merge(parray *backup_list, parray *to_keep_list, parray *to_purge_l
420419
keep_backup_id=base36enc_dup(keep_backup->start_time);
421420
elog(INFO,"Merge incremental chain between FULL backup %s and backup %s",
422421
base36enc(full_backup->start_time),keep_backup_id);
422+
pg_free(keep_backup_id);
423423

424424
merge_list=parray_new();
425425

@@ -553,8 +553,10 @@ do_retention_purge(parray *to_keep_list, parray *to_purge_list)
553553
base36enc(delete_backup->start_time),keeped_backup_id);
554554

555555
purge= false;
556+
pg_free(keeped_backup_id);
556557
break;
557558
}
559+
pg_free(keeped_backup_id);
558560
}
559561

560562
/* Retain backup */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp