Skip to content

Commit 3668240

Browse files
committed
Merge branch 'ptrack' into streamrepl
2 parents c6ab295 + e713477 commit 3668240

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

data.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ backup_data_file(const char *from_root, const char *to_root,
245245
file->write_size += sizeof(header) + read_len - header.hole_length;
246246
}
247247
pg_free(iter);
248+
/*
249+
* If we have pagemap then file can't be a zero size.
250+
* Otherwise, we will clear the last file.
251+
* Increase read_size to delete after.
252+
*/
253+
if (file->read_size == 0)
254+
file->read_size++;
248255
}
249256

250257
/*

0 commit comments

Comments
 (0)