mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-24 08:52:38 +02:00
Get list of backups in do_backup() as soon as possible
This commit is contained in:
parent
2bdaaf0eaf
commit
c8d5e0338d
10
backup.c
10
backup.c
@ -432,6 +432,11 @@ do_backup(void)
|
||||
*/
|
||||
check_system_identifiers();
|
||||
|
||||
/* 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.");
|
||||
|
||||
elog(LOG, "Backup start. backup-mode = %s, stream = %s",
|
||||
pgBackupGetBackupMode(¤t), current.stream ? "true" : "false");
|
||||
|
||||
@ -449,11 +454,6 @@ do_backup(void)
|
||||
/* 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.");
|
||||
|
||||
/* backup data */
|
||||
do_backup_database(backup_list);
|
||||
pgut_atexit_pop(backup_cleanup, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user