]> 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)
commit9aa1fcc547021c341606efbc7c343ff96a8bd964
treed992da59f7df92e8ff1c39f08ab1d4f2ef4094e9
parente5836f7b7d9a2949414ae022c74c18070202d429
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/fe_utils/astreamer_gzip.c
src/fe_utils/astreamer_lz4.c
src/fe_utils/astreamer_zstd.c