1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-04 10:44:46 +02:00

Avoid compression warnings for already compressed pages

This commit is contained in:
Konstantin Knizhnik 2018-11-08 15:25:28 +03:00
parent ea3ed9fa17
commit 728e3d5bdc

View File

@ -449,7 +449,7 @@ compress_and_backup_page(pgFile *file, BlockNumber blknum,
const char *errormsg = NULL; const char *errormsg = NULL;
/* The page was not truncated, so we need to compress it */ /* The page was not truncated, so we need to compress it */
header.compressed_size = do_compress(compressed_page, BLCKSZ, header.compressed_size = do_compress(compressed_page, sizeof(compressed_page),
page, BLCKSZ, calg, clevel, page, BLCKSZ, calg, clevel,
&errormsg); &errormsg);
/* Something went wrong and errormsg was assigned, throw a warning */ /* Something went wrong and errormsg was assigned, throw a warning */
@ -459,7 +459,6 @@ compress_and_backup_page(pgFile *file, BlockNumber blknum,
file->compress_alg = calg; file->compress_alg = calg;
file->read_size += BLCKSZ; file->read_size += BLCKSZ;
Assert (header.compressed_size <= BLCKSZ);
/* The page was successfully compressed. */ /* The page was successfully compressed. */
if (header.compressed_size > 0 && header.compressed_size < BLCKSZ) if (header.compressed_size > 0 && header.compressed_size < BLCKSZ)