1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-12 11:45:24 +02:00

fix skipping empty files in backup

This commit is contained in:
Anastasia 2017-05-29 12:45:56 +03:00
parent 035b639002
commit 798c447be7

2
data.c
View File

@ -299,7 +299,7 @@ backup_data_file(const char *from_root, const char *to_root,
* If we have pagemap then file can't be a zero size.
* Otherwise, we will clear the last file.
*/
if (n_blocks_read == n_blocks_skipped)
if (n_blocks_read != 0 && n_blocks_read == n_blocks_skipped)
{
if (remove(to_path) == -1)
elog(ERROR, "cannot remove file \"%s\": %s", to_path,