Re: Remove Deprecated Exclusive Backup Mode - Mailing list pgsql-hackers

From David Steele
Subject Re: Remove Deprecated Exclusive Backup Mode
Date
Msg-id a33cc38c-d274-8d00-9fe4-8114523232cb@pgmasters.net
Whole thread Raw
In response to Re: Remove Deprecated Exclusive Backup Mode  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Remove Deprecated Exclusive Backup Mode  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On 2/28/19 4:44 PM, Fujii Masao wrote:
> On Wed, Feb 27, 2019 at 4:35 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>>
>> Fujii Masao wrote:
>>> So, let me clarify the situations;
>>>
>>> (3) If backup_label.pending exists but recovery.signal doesn't, the server
>>>         ignores (or removes) backup_label.pending and do the recovery
>>>         starting the pg_control's REDO location. This case can happen if
>>>         the server crashes while an exclusive backup is in progress.
>>>         So crash-in-the-middle-of-backup doesn't prevent the recovery from
>>>         starting in this idea
>>
>> That's where I see the problem with your idea.
>>
>> It is fairly easy for someone to restore a backup and then just start
>> the server without first creating "recovery.signal", and that would
>> lead to data corruption.
> 
> Isn't this case problematic even when a backup was taken by pg_basebackup?
> Because of lack of recovery.signal, no archived WAL files are replayed and
> the database may not reach to the latest point.

It is problematic because we have a message encouraging users to delete 
backup_label when in fact they should be creating recovery.signal.

If the required WAL is present the cluster will not be corrupted.  It 
just may not play forward as far as you would prefer.

-- 
-David
david@pgmasters.net


pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: Row Level Security − leakproof-ness and performance implications
Next
From: Tom Lane
Date:
Subject: Re: Drop type "smgr"?