]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix finalization of decompressor astreamers.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 22 Mar 2026 22:06:48 +0000 (18:06 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 22 Mar 2026 22:06:48 +0000 (18:06 -0400)
commit80785a527b9cf74b16cb5bb65355f94157124bf7
tree254b687fc09fdf8db737595a8108315baa37a710
parenta19edb66a847b596a669941810f99686fb77a7b7
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
src/bin/pg_basebackup/bbstreamer_gzip.c
src/bin/pg_basebackup/bbstreamer_lz4.c
src/bin/pg_basebackup/bbstreamer_zstd.c