Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f21f63

Browse files
committed
bugfix: allow restore of DELTA backup to skip unchanged non-data files
1 parentac4ea5e commit7f21f63

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

‎src/restore.c‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -677,17 +677,23 @@ restore_files(void *arg)
677677
file->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 */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp