1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-12 14:56:08 +02:00

Try fix size.

This commit is contained in:
Zhuravlev Uriy aka stalkerg 2016-03-02 16:16:50 +03:00
parent 205d0a0c03
commit 375d915647
2 changed files with 4 additions and 2 deletions

View File

@ -328,7 +328,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
*/
if (current.backup_mode == BACKUP_MODE_DIFF_PAGE ||
current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
current.data_bytes += file->read_size;
current.data_bytes += file->write_size;
else if (current.backup_mode == BACKUP_MODE_FULL)
current.data_bytes += file->size;
}

4
data.c
View File

@ -213,12 +213,14 @@ backup_data_file(const char *from_root, const char *to_root,
return copy_file(from_root, to_root, file);
}
file->read_size += read_len;
/* if the page has not been modified since last backup, skip it */
if (lsn && !XLogRecPtrIsInvalid(page_lsn) && page_lsn < *lsn)
continue;
file->read_size += read_len;
upper_offset = header.hole_offset + header.hole_length;
upper_length = BLCKSZ - upper_offset;