mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-02-09 14:33:17 +02:00
Improve a couple of comments in backup.c
This commit is contained in:
parent
bee3489584
commit
a5afc8758e
9
delete.c
9
delete.c
@ -31,7 +31,7 @@ do_delete(pgBackupRange *range)
|
|||||||
elog(ERROR_ALREADY_RUNNING,
|
elog(ERROR_ALREADY_RUNNING,
|
||||||
"another pg_arman is running, stop delete.");
|
"another pg_arman is running, stop delete.");
|
||||||
|
|
||||||
/* Get complete list of backup */
|
/* Get complete list of backups */
|
||||||
backup_list = catalog_get_backup_list(NULL);
|
backup_list = catalog_get_backup_list(NULL);
|
||||||
if (!backup_list)
|
if (!backup_list)
|
||||||
elog(ERROR_SYSTEM, "No backup list found, can't process any more.");
|
elog(ERROR_SYSTEM, "No backup list found, can't process any more.");
|
||||||
@ -39,7 +39,7 @@ do_delete(pgBackupRange *range)
|
|||||||
/* Find backups to be deleted */
|
/* Find backups to be deleted */
|
||||||
for (i = 0; i < parray_num(backup_list); i++)
|
for (i = 0; i < parray_num(backup_list); i++)
|
||||||
{
|
{
|
||||||
pgBackup *backup = (pgBackup *)parray_get(backup_list, i);
|
pgBackup *backup = (pgBackup *) parray_get(backup_list, i);
|
||||||
|
|
||||||
/* delete backup and update status to DELETED */
|
/* delete backup and update status to DELETED */
|
||||||
if (do_delete)
|
if (do_delete)
|
||||||
@ -173,8 +173,7 @@ pgBackupDeleteFiles(pgBackup *backup)
|
|||||||
parray *files;
|
parray *files;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the backup was deleted already, nothing to do and such situation
|
* If the backup was deleted already, there is nothing to do.
|
||||||
* is not error.
|
|
||||||
*/
|
*/
|
||||||
if (backup->status == BACKUP_STATUS_DELETED)
|
if (backup->status == BACKUP_STATUS_DELETED)
|
||||||
return 0;
|
return 0;
|
||||||
@ -184,7 +183,7 @@ pgBackupDeleteFiles(pgBackup *backup)
|
|||||||
elog(INFO, "delete: %s", timestamp);
|
elog(INFO, "delete: %s", timestamp);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* update STATUS to BACKUP_STATUS_DELETING in preparation for the case which
|
* Update STATUS to BACKUP_STATUS_DELETING in preparation for the case which
|
||||||
* the error occurs before deleting all backup files.
|
* the error occurs before deleting all backup files.
|
||||||
*/
|
*/
|
||||||
if (!check)
|
if (!check)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user