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 <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 15

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/80785a527b9cf74b16cb5bb65355f94157124bf7

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(-)

Reply via email to