]> 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)
commit5540f9c430f65631887d31fa26dfdfa576c1c17e
treedaad84ede80bcdbb98d9e987f82f7d84251dd80b
parent3a35ab1d0126802045e7133788647a549ea6fa98
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