Fix finalization of decompressor astreamers.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 6ccfc44922123d497501a491b8becfca7b0096bb
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2026-03-22T22:06:48Z
Releases: 17.10
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

Files

Discussion