Re: pg_start_backup does not actually allow for consistent, file-level backup

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'otheus uibk *EXTERN*'" <otheus(dot)uibk(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_start_backup does not actually allow for consistent, file-level backup
Date: 2015-06-08 13:53:24
Message-ID: A737B7A37273E048B164557ADEF4A58B3661DFB0@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Anderson Valadares 2015-06-08 14:59:31 Momentary Delay
Previous Message David G. Johnston 2015-06-08 13:45:11 Re: pg_start_backup does not actually allow for consistent, file-level backup