File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -677,17 +677,23 @@ restore_files(void *arg)
677
677
file -> rel_path );
678
678
679
679
/*
680
- * For PAGE and PTRACK backups skip files which haven't changed
680
+ * For PAGE and PTRACK backups skip datafiles which haven't changed
681
681
* since previous backup and thus were not backed up.
682
682
* We cannot do the same when restoring DELTA backup because we need information
683
- * about every file to correctly truncate them.
683
+ * about every datafile to correctly truncate them.
684
684
*/
685
- if (file -> write_size == BYTES_INVALID &&
686
- (arguments -> backup -> backup_mode == BACKUP_MODE_DIFF_PAGE
687
- || arguments -> backup -> backup_mode == BACKUP_MODE_DIFF_PTRACK ))
685
+ if (file -> write_size == BYTES_INVALID )
688
686
{
689
- elog (VERBOSE , "The file didn`t change. Skip restore: \"%s\"" , file -> path );
690
- continue ;
687
+ /* data file, only PAGE and PTRACK can skip */
688
+ if (((file -> is_datafile && !file -> is_cfs ) &&
689
+ (arguments -> backup -> backup_mode == BACKUP_MODE_DIFF_PAGE ||
690
+ arguments -> backup -> backup_mode == BACKUP_MODE_DIFF_PTRACK )) ||
691
+ /* non-data file can be skipped regardless of backup type */
692
+ !(file -> is_datafile && !file -> is_cfs ))
693
+ {
694
+ elog (VERBOSE , "The file didn`t change. Skip restore: \"%s\"" , file -> path );
695
+ continue ;
696
+ }
691
697
}
692
698
693
699
/* Directories were created before */
You can’t perform that action at this time.
0 commit comments