Commit cd4b6af
committed
Fix unnecessary padding in incremental backups
Commit 10e3226 added padding to incremental backups to ensure the
block data is properly aligned. The code in sendFile() however failed to
consider that the header may be a multiple of BLCKSZ and thus already
aligned, adding a full BLCKSZ of unnecessary padding.
Not only does this make the incremental file a bit larger, but the other
places calculating the amount of padding did realize it's not needed and
did not include it in the formula. This resulted in pg_basebackup
getting confused while parsing the data stream, trying to access files
with invalid filenames (e.g. with binary data etc.) and failing.1 parent 8225c2f commit cd4b6af
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1638 | 1638 | | |
1639 | 1639 | | |
1640 | 1640 | | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
1644 | 1645 | | |
1645 | | - | |
| 1646 | + | |
1646 | 1647 | | |
1647 | 1648 | | |
1648 | 1649 | | |
| |||
0 commit comments