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 7/8/19 6:56 AM, Thorsten Schöning wrote:
> 
> If the full backup works at all... :-) And if it doesn't, I would like
> to know what I don't understand yet.

It doesn't.

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.

The checkpoint constrains the range of WAL that you need, but that WAL
is absolutely needed to reconstruct the changes that happened during the
backup.

pg_basebackup is a better alternative than rolling your own and there
are third-party solutions that offer more functionality.

Above all be sure to test your backups.  If you test the backups you are
currently taking you will quickly find that they do not work, i.e. they
will not recover to consistency.

Regards,
-- 
-David
david@xxxxxxxxxxxxx





[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