Skip to content

Commit 52a5487

Browse files
committed
code cleanup
1 parent 8ea9bca commit 52a5487

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/backup.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ do_backup_instance(PGconn *backup_conn)
574574
/* Print the list of files to backup catalog */
575575
write_backup_filelist(&current, backup_files_list, instance_config.pgdata,
576576
external_dirs);
577+
/* update backup control file to update size info */
578+
write_backup(&current);
577579

578580
/* clean external directories list */
579581
if (external_dirs)
@@ -1988,13 +1990,15 @@ backup_files(void *arg)
19881990

19891991
if (arguments->thread_num == 1)
19901992
{
1991-
/* update every 10 seconds */
1993+
/* update backup_content.control every 10 seconds */
19921994
if ((difftime(time(NULL), prev_time)) > 10)
19931995
{
19941996
prev_time = time(NULL);
19951997

19961998
write_backup_filelist(&current, arguments->files_list, instance_config.pgdata,
19971999
arguments->external_dirs);
2000+
/* update backup control file to update size info */
2001+
write_backup(&current);
19982002
}
19992003
}
20002004

src/catalog.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ write_backup_filelist(pgBackup *backup, parray *files, const char *root,
750750

751751
/* use extra variable to avoid reset of previous data_bytes value in case of error */
752752
backup->data_bytes = backup_size_on_disk;
753-
write_backup(backup);
754753
}
755754

756755
/*

0 commit comments

Comments
 (0)