pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivan Voras <ivoras@freebsd.org>
To: pgsql-performance@postgresql.org
Subject: Re: Backup strategies
Date: Wed, 15 Oct 2008 12:31:08 +0200
Message-ID: <gd4gp6$f4p$1@ger.gmane.org> (raw)
In-Reply-To: <48F5BBFC.80404@krogh.cc>
References: <48F4D693.9000304@lerner.co.il>
	<gd4d7q$3ed$1@ger.gmane.org>
	<48F5BBFC.80404@krogh.cc>

Jesper Krogh wrote:
> Ivan Voras wrote:
>> Warning: DO NOT do on-the-fly binary backups without snapshots.
>> Archiving the database directory with tar on a regular file system,
>> while the server is running, will result in an archive that most likely
>> won't work when restored.
> 
> Even if you do a "pg_start_backup/pg_stop_backup" as specified here:
> 
> http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html
> => Making a Base backup.
> 
> ??
> 
> It worked when I tested it, but I may just have been darn lucky.

No, it should be ok - I just didn't catch up with the times :) At least
that's my interpretation of this paragraph in documentation:

"""Some backup tools that you might wish to use emit warnings or errors
if the files they are trying to copy change while the copy proceeds.
This situation is normal, and not an error, when taking a base backup of
an active database; so you need to ensure that you can distinguish
complaints of this sort from real errors..."""

It looks like PostgreSQL freezes the state of the "data" directory in
this case (and new data goes only to the transaction log - pg_xlog),
which effectively creates an application-level snapshot. Good to know.

Attachments:

  signature.asc (application/pgp-signature, 251B) download

view thread (16+ messages)  latest in thread

Message-ID: <gd4gp6$f4p$1@ger.gmane.org>
Permalink:  ../gd4gp6$f4p$1@ger.gmane.org/
Also on:    postgresql.org/message-id/gd4gp6$f4p$1@ger.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: ivoras@freebsd.org
  Subject: Re: Backup strategies
  In-Reply-To: <gd4gp6$f4p$1@ger.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox