Re: Fix detection of truncated zstd-compressed backups

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Osama Abdul Qader <osamaabdulqader(dot)cs(at)gmail(dot)com>
Subject: Re: Fix detection of truncated zstd-compressed backups
Date: 2026-08-13 05:11:51
Message-ID: E30BAA38-1247-4172-9B5A-A0FFAF56D396@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Aug 13, 2026, at 11:39, Japin Li <japinli(at)hotmail(dot)com> wrote:
>
> Hi Chao,
>
> Thanks for updating the patch.

Hi Jipan, thanks a lot for reviewing.

>
> Date: Thu, 13 Aug 2026 11:32:59 +0800
>
> On Thu, 13 Aug 2026 at 09:47, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>> On Aug 13, 2026, at 05:56, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
>>>
>>> I have two minor comment for v5, otherwise it looks good to me:
>>
>> Hi Zsolt,
>>
>> Thanks a lot for reviewing.
>>
>>>
>>> +typedef enum
>>> +{
>>> + STREAM_NEW,
>>> + STREAM_HAS_DATA,
>>> + STREAM_FINISHED,
>>> +} pg_stream_state;
>>> +
>>>
>>> This is duplicated in two files, wouldn't be astreamer.h a better place for it?
>>
>> I think this makes sense. Plus your second comment, this enum can be shared by all 3 astreamers. I moved it to astreamer.h and renamed it to astreamer_decompression_state.
>>
>
> The astreamer_decompression_state should be added to pgindent's typedefs.list.

Yes, I missed that part.

PFA v7: addressed Jipan’s comment.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

Attachment Content-Type Size
v7-0001-Fix-detection-of-truncated-compressed-backups.patch application/octet-stream 9.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-08-13 05:16:19 Re: pgbench --continue-on-error: clarify TPS and failure reporting
Previous Message Chao Li 2026-08-13 05:06:07 Re: Fix small psql slash option leaks