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

Commit33ad944

Browse files
committed
PGPRO-2573: minor changes to comments
1 parentfc16c52 commit33ad944

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

‎src/delete.c‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ int do_retention(void)
150150
if (retention_is_set&&backup_list_is_empty)
151151
elog(WARNING,"Backup list is empty, retention purge and merge are problematic");
152152

153-
/* showfancy message */
153+
/*Populate purge and keep lists, andshowretention state messages */
154154
if (retention_is_set&& !backup_list_is_empty)
155155
do_retention_internal(backup_list,to_keep_list,to_purge_list);
156156

@@ -197,7 +197,6 @@ do_retention_internal(parray *backup_list, parray *to_keep_list, parray *to_purg
197197
{
198198
inti;
199199
time_tcurrent_time;
200-
boolbackup_list_is_empty= false;
201200

202201
/* For retention calculation */
203202
uint32n_full_backups=0;
@@ -207,10 +206,6 @@ do_retention_internal(parray *backup_list, parray *to_keep_list, parray *to_purg
207206
/* For fancy reporting */
208207
floatactual_window=0;
209208

210-
/* sanity */
211-
if (parray_num(backup_list)==0)
212-
backup_list_is_empty= true;
213-
214209
/* Get current time */
215210
current_time=time(NULL);
216211

@@ -294,21 +289,22 @@ do_retention_internal(parray *backup_list, parray *to_keep_list, parray *to_purg
294289

295290
for (i=0;i<parray_num(backup_list);i++)
296291
{
297-
298292
pgBackup*backup= (pgBackup*)parray_get(backup_list,i);
299293

300294
/* Do not keep invalid backups by retention */
301295
if (backup->status!=BACKUP_STATUS_OK&&
302296
backup->status!=BACKUP_STATUS_DONE)
303297
continue;
304298

299+
/* only incremental backups should be in keep list */
305300
if (backup->backup_mode==BACKUP_MODE_FULL)
306301
continue;
307302

308303
/* orphan backup cannot be in keep list */
309304
if (!backup->parent_backup_link)
310305
continue;
311306

307+
/* skip if backup already in purge list */
312308
if (parray_bsearch(to_purge_list,backup,pgBackupCompareIdDesc))
313309
continue;
314310

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp