mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-12-11 11:41:33 +02:00
fix skipping empty files in backup
This commit is contained in:
parent
035b639002
commit
798c447be7
2
data.c
2
data.c
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user