| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Osama Abdul Qader <osamaabdulqader(dot)cs(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Fix detection of truncated zstd-compressed backups |
| Date: | 2026-08-12 04:42:34 |
| Message-ID: | 6A9A9FC1-B59E-4454-8B95-570054038EFE@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Aug 11, 2026, at 16:32, Osama Abdul Qader <osamaabdulqader(dot)cs(at)gmail(dot)com> wrote:
>
> Hi Chao,
>
> Thanks for the feedback, That's make sense to me, I'll wait for Mr. Daniel's thought on whether the existing 010_client_untar.pl coverage is sufficient.
>
> Thanks,
> Osama Abdul Qader
>
> On Tue, Aug 11, 2026 at 1:28 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
>
> > On Aug 11, 2026, at 15:40, Osama Abdul Qader <osamaabdulqader(dot)cs(at)gmail(dot)com> wrote:
> >
> > Hi Chao,
> >
> > I noticed your commit f80cb3ae0737 ("Fix detection of truncated zstd-compressed backups"), which addresses the truncated ZSTD backup issue I had reported.
> >
> > I added a regression test to src/bin/pg_verifybackup/t/008_untar.pl. The test creates a server-side ZSTD backup, verifies the intact backup, truncates base.tar.zst by one byte, and then verifies that pg_verifybackup rejects the truncated backup.
> >
> > The test passes with your fix:
> > make check -C src/bin/pg_verifybackup TESTS=t/008_untar
> >
> > Result: PASS.
> >
> > I noticed that your commit changes astreamer_zstd.c but does not add a regression test to 008_untar.pl. Would this test be useful to include with the fix?
> > Thanks,
> > Osama Abdul Qader
>
> Hi Osama,
>
> Thanks for your review and for adding the test. I think the test Daniel added to 010_client_untar.pl covers all three astreamer types.
>
> Your test covers server-side compression, but from the astreamer’s perspective, I don't think there is much difference between client side and server side compression. Therefore, I am not sure that an additional server side test is needed. Let’s see what Daniel thinks.
>
> Best regards,
> --
> Chao Li (Evan)
> HighGo Software Co., Ltd.
> https://www.highgo.com/
>
Hi, Osama,
FYI, when you want to attach a patch file, please include “nocfbot” in the file name. Otherwise, CommitFest will pick up your patch file and incorrectly ask for a rebase. See [1].
Resending v5 to recover the CF entry.
[1] https://wiki.postgresql.org/wiki/Cfbot#When_are_patches_tested?
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Fix-detection-of-truncated-compressed-backups.patch | application/octet-stream | 8.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-08-12 04:53:24 | Re: Fix small psql slash option leaks |
| Previous Message | Michael Paquier | 2026-08-12 04:26:46 | Re: [PATCH] Avoid uninitialized-value error in poll_query_until timeout diagnostic |