aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2024-04-14 20:34:29 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2024-04-14 20:37:49 +0200
commitcd4b6af620975bb9802c464a06d2289d2f97cbf4 (patch)
tree75f773d7a91d78f00bdae8327a3cf1beea045cae /src/backend/utils/adt/ruleutils.c
parent8225c2fd40cd9f7d60a826affeacdd8bf0de7bee (diff)
downloadpostgresql-cd4b6af620975bb9802c464a06d2289d2f97cbf4.tar.gz
postgresql-cd4b6af620975bb9802c464a06d2289d2f97cbf4.zip
Fix unnecessary padding in incremental backups
Commit 10e3226ba13d 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.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
0 files changed, 0 insertions, 0 deletions