Re: Fix detection of truncated zstd-compressed backups

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: 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-12 21:56:59
Message-ID: CAN4CZFM_RaAxiRcf0JmhmNqUac+9-3KYGVu+Uvc43VxH7bibaw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have two minor comment for v5, otherwise it looks good to me:

+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?

+ if (!mystreamer->stream_finished)
+ pg_fatal("could not decompress data: compressed stream is incomplete");
+

The other two checks distinguish empty from incomplete, is this
difference intended?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-08-12 22:18:16 Re: [PATCH] Fix PITR pause bypass when initial XLOG_RUNNING_XACTS has subxid overflow
Previous Message Nathan Bossart 2026-08-12 21:54:04 Re: problems with toast.* reloptions