Re: Add recovery to pg_control and remove backup_label - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Add recovery to pg_control and remove backup_label
Date
Msg-id 20231120235855.hukwevautrequ4ag@awork3.anarazel.de
Whole thread Raw
In response to Re: Add recovery to pg_control and remove backup_label  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Add recovery to pg_control and remove backup_label
Re: Add recovery to pg_control and remove backup_label
List pgsql-hackers
Hi,

On 2023-11-21 08:52:08 +0900, Michael Paquier wrote:
> On Mon, Nov 20, 2023 at 12:37:46PM -0800, Andres Freund wrote:
> > Given that, I wonder if what we should do is to just add a new field to
> > pg_control that says "error out if backup_label does not exist", that we set
> > when creating a streaming base backup
>
> That would mean that one still needs to take an extra step to update a
> control file with this byte set, which is something you had a concern
> with in terms of compatibility when it comes to external backup
> solutions because more steps are necessary to take a backup, no?

I was thinking we'd just set it in the pg_basebackup style path, and we'd
error out if it's set and backup_label is present. But we'd still use
backup_label without the pg_control flag set.

So it'd just provide a cross-check that backup_label was not removed for
pg_basebackup style backup, but wouldn't do anything for external backups. But
imo the proposal to just us pg_control doesn't actually do anything for
external backups either - which is why I think my proposal would achieve as
much, for a much lower price.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add recovery to pg_control and remove backup_label
Next
From: Andres Freund
Date:
Subject: Re: Hide exposed impl detail of wchar.c