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 20231120203746.x3dgftmwvfgl5tdy@awork3.anarazel.de
Whole thread Raw
In response to Re: Add recovery to pg_control and remove backup_label  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Add recovery to pg_control and remove backup_label
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-20 11:11:13 -0500, Robert Haas wrote:
> I think we need more votes to make a change this big. I have a
> concern, which I think I've expressed before, that we keep whacking
> around the backup APIs, and that has a cost which is potentially
> larger than the benefits.

+1.  The amount of whacking around in this area has been substantial, and it's
hard for operators to keep up. And realistically, with data sizes today, the
pressure to do basebackups with disk snapshots etc is not going to shrink.


Leaving that concern aside, I am still on the fence about this proposal. I
think it does decrease the chance of getting things wrong in the
streaming-basebackup case. But for external backups, it seems almost
universally worse (with the exception of the torn pg_control issue, that we
also can address otherwise):

It doesn't reduce the risk of getting things wrong, you can still omit placing
a file into the data directory and get silent corruption as a consequence. In
addition, it's harder to see when looking at a base backup whether the process
was right or not, because now the good and bad state look the same if you just
look on the filesystem level!

Then there's the issue of making ad-hoc debugging harder by not having a
human readable file with information anymore, including when looking at the
history, via backup_label.old.


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

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Schoemans Maxime
Date:
Subject: Re: Implement missing join selectivity estimation for range types
Next
From: Andres Freund
Date:
Subject: Re: Add recovery to pg_control and remove backup_label