pgsql: Fix unnecessary padding in incremental backups

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема pgsql: Fix unnecessary padding in incremental backups
Дата
Msg-id E1rw4kA-0023SJ-5i@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cd4b6af620975bb9802c464a06d2289d2f97cbf4

Modified Files
--------------
src/backend/backup/basebackup.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: pgsql: Add regression test for BRIN parallel builds
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: [MASSMAIL]pgsql: Put back initialization of 'sslmode', to silence Coverity