From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Brad Littlejohn <blittlejohn@posportal.com>
To: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: Re: Apply WAL logs after database restore
Date: Thu, 18 Feb 2010 16:49:43 -0600
Message-ID: <4B7D6FA7020000250002F3DA@gw.wicourts.gov> (raw)
In-Reply-To: <FC2125863502344C9B615565CF826F7CD9B323A3@posexch1.posportal.com>
References: <FC2125863502344C9B615565CF826F7CD9B323A2@posexch1.posportal.com>
<4B7D68BF020000250002F3D4@gw.wicourts.gov>
<FC2125863502344C9B615565CF826F7CD9B323A3@posexch1.posportal.com>
Brad Littlejohn <blittlejohn@posportal.com> wrote:
> Okay.. then let's ask this. If I take a file-based backup of the
> source database now, the previous WAL logs should be irrelevant,
> right? The reason I ask, is that one of my developers made a
> change to 2 tables last night, didn't wrap his changes around a
> begin/commit/rollback statement, and dropped a column he needs
> back. The WAL logs are now the only place the column and the data
> for that column exist. If I took a file-based backup of the
> current database (read: today), could I apply the WAL logs (from
> up to when they made that change) to that file-based backup to get
> the data back that he needs?
How much of the data was in that column when the pg_dump was run?
You could certainly recover any of that. Data entered after that
would be in the WAL file stream somewhere, but picking it out would
be a very tedious and time-consuming process. I'm not aware of any
tools which would make that easy, but capturing a file-based copy of
your database as soon as possible, as well as keeping that old
pg_dump output, would be important if you have any hope of sifting
that out. I'd start by doing those, "just in case" -- but your best
bet would be to try to find some other source to re-enter the data,
if at all possible.
Then be sure to follow backup directions from the documentation more
closely, and *never* believe that any backup technique is working
until you've tested a restore. On any product. I don't like to
trust that any particular *backup* is good until I've restored it,
even if the process hasn't changed.
-Kevin
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: Kevin.Grittner@wicourts.gov, blittlejohn@posportal.com
Subject: Re: Apply WAL logs after database restore
In-Reply-To: <4B7D6FA7020000250002F3DA@gw.wicourts.gov>
* 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