[PATCH] Fix minor issues in astreamer_zstd.c

From: zengman <zengman(at)halodbtech(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Fix minor issues in astreamer_zstd.c
Date: 2026-01-10 04:59:48
Message-ID: tencent_33169E186D56ED2851C88FD4@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

While reviewing the zstd code, I noticed two minor issues in astreamer_zstd.c that appear to be errors:

First, the file header comment for astreamer_zstd_compressor incorrectly references "lz4 compression" instead of "zstd compression" — this looks like a copy-paste error from astreamer_lz4.c.
Second, in the astreamer_zstd_decompressor_finalize function, it seems there may be an error in parameter passing: the function uses the full buffer capacity (bbs_buffer.maxlen) when calling astreamer_content, rather than the actual length of decompressed data (zstd_outBuf.pos).

I’ve attached two patches to address these potential issues:
0001: Fixes the incorrect comment in the astreamer_zstd.c header
0002: Corrects the parameter passed to astreamer_content in astreamer_zstd_decompressor_finalize

--
Regards,
Man Zeng
www.openhalo.org

Attachment Content-Type Size
0001-Fix-comment-error-in-astreamer_zstd.c-header.patch application/octet-stream 1.0 KB
0002-Fix-data-corruption-in-astreamer_zstd_decompressor_f.patch application/octet-stream 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marcos Magueta 2026-01-10 05:26:11 Re: WIP - xmlvalidate implementation from TODO list
Previous Message Xuneng Zhou 2026-01-10 04:47:13 Re: Implement waiting for wal lsn replay: reloaded