1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-07-16 07:14:15 +02:00

Initialize backup_cleanup() earlier

This commit is contained in:
Arthur Zakirov
2017-04-20 14:14:14 +03:00
parent 1c87d613f4
commit c47af357b1

View File

@ -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);