Re: Incremental backup accepts a prior backup that extends past a timeline switch

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Raja Sai pranav <rajasaipranav0(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, robertmhaas(at)gmail(dot)com
Subject: Re: Incremental backup accepts a prior backup that extends past a timeline switch
Date: 2026-11-02 09:21:05
Message-ID: CAHGQGwFpMogCvU3Tm+BJonzCgdzWy6WwPdiDRduG9oM97uPFPg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 24, 2026 at 5:39 AM Raja Sai pranav
<rajasaipranav0(at)gmail(dot)com> wrote:
> The attached patch adds the missing check: if the prior backup's final
> timeline has an end in this server's history, the prior backup's WAL range
> must not end after it.

Thanks for the report and patch!
Attached is a revised version with these changes:

- Check the timeline switch point before the new backup's start LSN,
so the error directly reports the history mismatch.
- Extend 008_promote.pl rather than adding a separate test.
- Document the timeline requirement for incremental backup.

Thought?

Regards,

--
Fujii Masao

Attachment Content-Type Size
v2-0001-Reject-incremental-backups-based-on-a-backup-from.patch application/octet-stream 5.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-11-02 09:30:48 Re: Setting the number of digits after the decimal point with a psql's pset variable
Previous Message Roman Khapov 2026-11-02 09:11:53 Re: pgbench --unlogged-tables silently ignored for branches/tellers/history when --partitions is used