pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Imre Oolberg <imre@auul.pri.ee>
Cc: pgsql-admin@postgresql.org
Subject: Re: Re: pg v. 8.4.5 misses objects and data after restoring from backup using wal
Date: Mon, 03 Jan 2011 13:42:32 -0500
Message-ID: <22500.1294080152@sss.pgh.pa.us> (raw)
In-Reply-To: <42066935-6D27-46E3-8094-836D204816B7@elevated-dev.com>
References: <AANLkTikY_XJ0Ok7bLGVxXXfGgenfnzJ4RnSiM_H40FCM@mail.gmail.com>
	<4D2213EB.7090700@auul.pri.ee>
	<42066935-6D27-46E3-8094-836D204816B7@elevated-dev.com>

Scott Ribe <scott_ribe@elevated-dev.com> writes:
> On Jan 3, 2011, at 11:22 AM, Imre Oolberg wrote:
>> But http://www.postgresql.org/docs/9.0/interactive/continuous-archiving.html suggests to use tar on rsync and i guess that PostgreSQL recovery with wal files takes care of these inconsistencies that are created during copying filesystem, right?

> Yes, but the database is recovered to the consistent state as of the pg_start_backup command, as I pointed out to you before. Results of transactions that commit after the pg_start_backup command will not be in the backed up database.

That's either incorrect or poorly worded.  The only way to get a
consistent, usable database is to replay all the WAL that was generated
between pg_start_backup and pg_stop_backup.  That will fix up whatever
inconsistencies exist in the base backup fileset.  Once you've done
that, you do have the results of transactions that committed after
pg_start_backup (and up to pg_stop_backup).  If you haven't done that,
what you have is an inconsistent pile of rather arbitrary bits.  The
base backup by itself (without the concurrently-created WAL) is
*useless*.

			regards, tom lane



view thread (16+ messages)  latest in thread

Message-ID: <22500.1294080152@sss.pgh.pa.us>
Permalink:  ../22500.1294080152@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22500.1294080152@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, scott_ribe@elevated-dev.com, imre@auul.pri.ee
  Subject: Re: Re: pg v. 8.4.5 misses objects and data after restoring from backup using wal
  In-Reply-To: <22500.1294080152@sss.pgh.pa.us>

* 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