@@ -677,17 +677,23 @@ restore_files(void *arg)
677677file -> rel_path );
678678
679679/*
680- * For PAGE and PTRACK backups skipfiles which haven't changed
680+ * For PAGE and PTRACK backups skipdatafiles which haven't changed
681681 * since previous backup and thus were not backed up.
682682 * We cannot do the same when restoring DELTA backup because we need information
683- * about everyfile to correctly truncate them.
683+ * about everydatafile to correctly truncate them.
684684 */
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 )
688686{
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+ }
691697}
692698
693699/* Directories were created before */