Re: small pg_combinebackup improvements

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Amul Sul <sulamul@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-11-04T15:26:41Z
Lists: pgsql-hackers
On Sun, Nov 3, 2024 at 11:40 PM Amul Sul <sulamul@gmail.com> wrote:
> +1 for the back-patching.
>
> For 0002, I think we could report the error a bit earlier — the better
> place might be in the else part of the following IF-block, IMO:
>
> /*
>  * If s->header_length == 0, then this is a full file; otherwise, it's
>  * an incremental file.
>  */
> if (s->header_length == 0)

We could, but I have some follow-up patches adding some new
functionality which I plan to post soon, and for those patches, it
turns out to be more convenient to have the error check where I put
it. So I'm sticking with that placement.

Committed and back-patched both to v17; thanks to both of you for the review.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. pg_combinebackup: Error if incremental file exists in full backup.

  2. pg_combinebackup: When reconstructing, avoid double slash in filename.