Re: Online backup of PostgreSQL data. - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Online backup of PostgreSQL data.
Date
Msg-id A737B7A37273E048B164557ADEF4A58B50FA8266@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: Online backup of PostgreSQL data.  (John R Pierce <pierce@hogranch.com>)
Responses Re: Online backup of PostgreSQL data.
List pgsql-general
John R Pierce wrote:
> to copy the data directory and have it be useful you need to bracket the copy with calls to
> pg_start_backup() and pg_stop_backup() .... this ensures the data files are coherent.   this is in
> fact what pg_basebackup does for you....

I apologize for my fussiness, but this is a misconception I encounter so frequently
that I have to speak up.

The file system copy does not become consistent (isn't that what you meant?) if it
is surrounded by pg_start_backup() and pg_stop_backup().  What happens is that
a) a backup.label file is created that tells recovery where to start
b) more WAL is generated so that all changes can be replayed safely.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Online backup of PostgreSQL data.
Next
From: pinker
Date:
Subject: Shouldn't "WHEN (OLD.* IS DISTINCT FROM NEW.*)" clause be independent from data type?