pgsql: Fix finalization of decompressor astreamers. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix finalization of decompressor astreamers.
Date
Msg-id E1w4Qwo-000zUU-2p@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix finalization of decompressor astreamers.

Send the correct amount of data to the next astreamer, not the
whole allocated buffer size.  This bug escaped detection because
in present uses the next astreamer is always a tar-file parser
which is insensitive to trailing garbage.  But that may not
be true in future uses.

Author: Andrew Dunstan <andrew@dunslane.net>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/2178517.1774064942@sss.pgh.pa.us
Backpatch-through: 15

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6ccfc44922123d497501a491b8becfca7b0096bb

Modified Files
--------------
src/bin/pg_basebackup/bbstreamer_gzip.c | 9 +++++----
src/bin/pg_basebackup/bbstreamer_lz4.c  | 9 +++++----
src/bin/pg_basebackup/bbstreamer_zstd.c | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: Add fake LSN support to hash index AM.
Next
From: Tom Lane
Date:
Subject: pgsql: Remove nonfunctional tar file trailer size check.