Re: Do results of pg_start_backup work without WAL segments createdduring backup? - Mailing list pgsql-admin

From Rui DeSousa
Subject Re: Do results of pg_start_backup work without WAL segments createdduring backup?
Date
Msg-id 1A4A685C-7840-464A-8EEB-704E6423240B@crazybean.net
Whole thread Raw
In response to Re: Do results of pg_start_backup work without WAL segments created during backup?  (Thorsten Schöning <tschoening@am-soft.de>)
List pgsql-admin

> On Jul 8, 2019, at 9:10 AM, Thorsten Schöning <tschoening@am-soft.de> 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
theback 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/suspectdatabase. 

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().  





pgsql-admin by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: Como transformar punto decimal a coma decimal
Next
From: Stephen Frost
Date:
Subject: Re: When it's really necessary to enable WAR archiving in case oflow level backups?