Re: Do results of pg_start_backup work without WAL segments created during backup?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jul 8, 2019, at 9:10 AM, Thorsten Schöning <tschoening@xxxxxxxxxx> wrote:
> 
> Guten Tag David Steele,
> am Montag, 8. Juli 2019 um 14:12 schrieben Sie:
> 
>> pg_start_backup() does a checkpoint, but then the database continues
>> writing as you copy the files in whatever order you choose.  You may
>> copy a file that has a partial write or copy some files involved in a
>> transaction before it happens and others afterwards -- in fact this is
>> normal and expected.
> 
> And because that's expected, Postgres can successfully restore from
> that, e.g. having used checkpoints before:

Thorsten, 

A checkpoint can not sync data that has already been backed up.  Also, the files are being actively written too while the back is occurring thus the backup contains suspected pages.  

Postgres needs the WALs to resolve any issues that were created by the backup.  Without the WALs you have a corrupted/suspect database.

It’s just like crash recovery; the database has to replay everything since the last checkpoint.  However, with a backup… the checkpoint is pg_start_backup(). 








[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux