Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

From: David Steele <david(at)pgmasters(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Michael Paquier <michael(at)paquier(dot)xyz>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Date: 2021-11-30 22:58:15
Message-ID: 1cce9981-2c48-981a-a936-812830dfb3b1@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/30/21 17:26, Tom Lane wrote:
> "Bossart, Nathan" <bossartn(at)amazon(dot)com> writes:
>> It looks like the exclusive way has been marked deprecated in all
>> supported versions along with a note that it will eventually be
>> removed. If it's not going to be removed out of fear of breaking
>> backward compatibility, I think the documentation should be updated to
>> say that. However, unless there is something that is preventing users
>> from switching to the non-exclusive approach, I think it is reasonable
>> to begin thinking about removing it.
>
> If we're willing to outright remove it, I don't have any great objection.
> My original two cents was that we shouldn't put effort into improving it;
> but removing it isn't that.

The main objections as I recall are that it is much harder for simple
backup scripts and commercial backup integrations to hold a connection
to postgres open and write the backup label separately into the backup.

As Stephen noted, working in this area is much harder (even in the docs)
due to the need to keep both methods working. When I removed exclusive
backup it didn't break any tests, other than one that needed to generate
a corrupt backup, so we have virtually no coverage for that method.

I did figure out how to keep the safe part of exclusive backup (not
having to maintain a connection) while removing the dangerous part
(writing backup_label into PGDATA), but it was a substantial amount of
work and I felt that it had little chance of being committed.

Attaching the thread [1] that I started with a patch to remove exclusive
backup for reference.

--

[1]
https://www.postgresql.org/message-id/flat/ac7339ca-3718-3c93-929f-99e725d1172c%40pgmasters.net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bossart, Nathan 2021-11-30 23:31:04 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Previous Message Bossart, Nathan 2021-11-30 22:50:11 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file