Fix finalization of decompressor astreamers.
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_basebackup/bbstreamer_gzip.c | modified | +5 −4 |
| src/bin/pg_basebackup/bbstreamer_lz4.c | modified | +5 −4 |
| src/bin/pg_basebackup/bbstreamer_zstd.c | modified | +1 −1 |
Discussion
- pg_waldump: support decoding of WAL inside tarfile 126 messages · 2025-08-07 → 2026-04-15