Re: [HACKERS] question: data file update when pg_basebackup in progress - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] question: data file update when pg_basebackup in progress
Date
Msg-id CAB7nPqRj90hnZoNqmgFpLpbd1yS1bQ72vf3cBw4Fg2Zsgh8K=g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] question: data file update when pg_basebackup in progress  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On Wed, Apr 26, 2017 at 1:45 AM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> The first write to a page after a checkpoint is always recorded in the WAL
> as a full page write.  Every WAL file since the checkpoint must also be
> copied to the backed up system.  The replay of those WAL files is what
> brings the remote and local system into sync with respect to all changes
> since the backup checkpoint.

Bringing to the point that the presence of backup_label in a backup is
critical, as this tells Postgres from which position in WAL it should
begin recovery to bring the system up to a consistent state.
pg_basebackup also makes sure that the last WAL segment needed is
archived before the backup completes so as recovery can completely be
done.
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] PG 10 release notes
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] PG 10 release notes