]> 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)
commit6ccfc44922123d497501a491b8becfca7b0096bb
tree9e67f6f9bd8f4b9512b37ef03461622bb1034739
parent876fa84a275eea578b4a89bb910e184f98d991c2
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