Re: Add recovery to pg_control and remove backup_label

From: David Steele <david(at)pgmasters(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: Add recovery to pg_control and remove backup_label
Date: 2024-03-10 03:47:26
Message-ID: 51b7c0f9-07ab-4258-893f-ce9187015571@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/29/24 12:28, David Steele wrote:
> On 1/28/24 19:11, Michael Paquier wrote:
>> On Fri, Jan 26, 2024 at 06:27:30PM +0530, vignesh C wrote:
>>> Please post an updated version for the same.
>>>
>>> [1] - http://cfbot.cputube.org/patch_46_3511.log
>>
>> With the recent introduction of incremental backups that depend on
>> backup_label and the rather negative feedback received, I think that
>> it would be better to return this entry as RwF for now.  What do you
>> think?
>
> I've been thinking it makes little sense to update the patch. It would
> be a lot of work with all the new changes for incremental backup and
> since Andres and Robert appear to be very against the idea, I doubt it
> would be worth the effort.

I've had a new idea which may revive this patch. The basic idea is to
keep backup_label but also return a copy of pg_control from
pg_stop_backup(). This copy of pg_control would be safe from tears and
have a backupLabelRequired field set (as Andres suggested) so recovery
cannot proceed without the backup label.

So, everything will continue to work as it does now. But, backup
software can be enhanced to write the improved pg_control that is
guaranteed not to be torn and has protection against a missing backup label.

Of course, pg_basebackup will write the new backupLabelRequired field
into pg_control, but this way third party software can also gain
advantages from the new field.

Thoughts?

Regards,
-David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2024-03-10 03:58:19 Re: Add checkpoint/redo LSNs to recovery errors.
Previous Message Thomas Munro 2024-03-10 01:17:34 Re: Vectored I/O in bulk_write.c