Re: pg_start_backup does not actually allow for consistent, file-level backup - Mailing list pgsql-general

From Albe Laurenz
Subject Re: pg_start_backup does not actually allow for consistent, file-level backup
Date
Msg-id A737B7A37273E048B164557ADEF4A58B3661DFB0@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: pg_start_backup does not actually allow for consistent, file-level backup  (otheus uibk <otheus.uibk@gmail.com>)
List pgsql-general
otheus uibk wrote:
> Just to nit-pick, I see nowhere in either version of the manual the indication that it is normal for
> postgresql to continue to update files in its data catalog between pg_start_backup and pg_stop_backup.
> The closest I see comes in this paragraph:
> 
> ** Some file system backup tools emit warnings or errors if the files they are trying to copy change
> while the copy proceeds. When taking a base backup of an active database, this situation is normal and
> not an error.
> 
> Does "this situation" refer to the tools emitting warnings or to the fact that postgresql is updating
> the files? It might be the case, for instance, that timestamps are updated but not the contents of the
> files (this is what I had assumed prior to today).

The manual does not contain all the details how backup and recovery works internally,
you'd have to see the source code for that.

It is normal for the files to change while backup is in progress (in fact, the database
continues working normally, but more information is written to the Write Ahead Log).
It is also normal for backup tools to complain if the file they copy changes while they
read it.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_start_backup does not actually allow for consistent, file-level backup
Next
From: Anderson Valadares
Date:
Subject: Momentary Delay