From c47af357b1b96f15843b58b625f32003e252a01e Mon Sep 17 00:00:00 2001 From: Arthur Zakirov Date: Thu, 20 Apr 2017 14:14:14 +0300 Subject: [PATCH] Initialize backup_cleanup() earlier --- backup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup.c b/backup.c index ed3930bf..b6bc6d0d 100644 --- a/backup.c +++ b/backup.c @@ -432,14 +432,14 @@ do_backup(void) elog(LOG, "Backup destination is initialized"); + /* set the error processing function for the backup process */ + pgut_atexit_push(backup_cleanup, NULL); + /* get list of backups already taken */ backup_list = catalog_get_backup_list(INVALID_BACKUP_ID); if (backup_list == NULL) elog(ERROR, "Failed to get backup list."); - /* set the error processing function for the backup process */ - pgut_atexit_push(backup_cleanup, NULL); - /* backup data */ do_backup_database(backup_list); pgut_atexit_pop(backup_cleanup, NULL);