Re: cleanup patches for incremental backup

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: cleanup patches for incremental backup
Date: 2024-01-29 20:18:50
Message-ID: CA+Tgmob50yte0TN-vsR8ZL-CqxsEVNKrN1QNpo7z=hr3kxfTNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 29, 2024 at 1:21 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> > Ah, I think this query:
> >
> > SELECT tli, start_lsn, end_lsn from pg_available_wal_summaries()
> > WHERE tli = $summarized_tli AND end_lsn > '$summarized_lsn'
> >
> > is returning more than one row in some cases. I attached a quick sketch of
> > an easy way to reproduce the issue as well as one way to fix it.
>
> The buildfarm just caught a failure with the new logging in place:
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2024-01-29%2018%3A09%3A10
>
> I'm not totally sure my "fix" is correct, but I think this does confirm the
> theory.

Ah. The possibilities of ending up with TWO new WAL summaries never
occurred to me. Things that never occurred to the developer are a
leading cause of bugs, and so here.

I'm wondering if what we need to do is run pg_walsummary on both
summary files in that case. If we just pick one or the other, how do
we know which one to pick?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-01-29 20:38:27 Re: UUID v7
Previous Message Andrew Dunstan 2024-01-29 20:18:10 Re: Should we remove -Wdeclaration-after-statement?