Re: reassure me that it's good to copy pg_control last in a basebackup - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: reassure me that it's good to copy pg_control last in a basebackup
Date
Msg-id 5A3C9C19.3040805@anastigmatix.net
Whole thread Raw
In response to Re: reassure me that it's good to copy pg_control last in a basebackup  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: reassure me that it's good to copy pg_control last in a basebackup
List pgsql-hackers
On 12/22/17 00:29, Michael Paquier wrote:
> exclusive backup API can lead to problems? Imagine the case where
> you take a exclusive backup and the instance from which a backup is
> taken crashes, *with* a backup_label file on disk. Oops. That's one
> reason behind non-exclusive backups, which is what pg_basebackup

I was noticing that terminology in the long backup-from-standby thread
I was reading, but it wasn't clear to me how the terms originated.
What's exclusive about pg_start_backup/copy/pg_stop_backup? And what's
nonexclusive about pg_basebackup (which, AFAICS, is following roughly
the same sequence under the hood)?

By the way, what does happen in that case? I'm guessing it wakes up,
sees the backup_label file, decides it's doing a PITR, and starts
replaying already-applied WAL from the start-of-backup checkpoint,
rather than from the most recent one? Oops.

-Chap


pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Fix a typo in autoprewarm.c
Next
From: Michael Paquier
Date:
Subject: Re: Enhance pg_stat_wal_receiver view to display connected host