pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chander Ganesan <chander@otg-nc.com>
To: j a <inboundfilter@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Recovery from Current WAL (8.2)
Date: Mon, 06 Aug 2007 18:59:26 -0400
Message-ID: <46B7A7CE.3030900@otg-nc.com> (raw)
In-Reply-To: <9da20ce20708051407u630778e3l9dafff02dc8aece5@mail.gmail.com>
References: <9da20ce20708051407u630778e3l9dafff02dc8aece5@mail.gmail.com>

j a wrote:
> From my reading, I can use PITR recovery to restore my database to its 
> state just prior to a recent change (not even an hour ago). The 
> erroneous change resulted from an UPDATE with no WHERE on a small 
> table (<700 rows); I mention this only in case there is a simpler 
> recovery technique I can use for such a small subset of the entire 
> database.
You can do this if you have a PITR backup.  That is , you made a PITR 
backup some time ago and wish to use all of the WAL files since then and 
the time that you want to recover to to restore.  You cannot simply "go 
backwards" from the current database state, regardless of the WAL files 
you have at your disposal.
>
> The docs state that restore_command is required in recovery.conf, and 
> that the server will check pg_xlog/ for any requested files not found 
> in the specified archive location.
>
> Can I use a command that points to an empty directory as the archive 
> location to force checks to pg_xlog? Or is there some 'cleaner' way?
If you made a PITR backup at some point in the past you would have at 
least a couple of files in your WAL archive directory..
>
> Also, I read in another post (about v8.1) that the WAL records are 
> written in 16MB segments. If the WAL containing my recovery target 
> hasn't been written yet, how can I determine when it has and is 
> available to me?
>
> I'm running 8.2 on CentsOS 5, if it matters any.


-- 
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
919-463-0999/866-229-3386
http://www.otg-nc.com




view thread (2+ messages)

Message-ID: <46B7A7CE.3030900@otg-nc.com>
Permalink:  ../46B7A7CE.3030900@otg-nc.com/
Also on:    postgresql.org/message-id/46B7A7CE.3030900@otg-nc.com

 · 

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: chander@otg-nc.com, inboundfilter@gmail.com
  Subject: Re: Recovery from Current WAL (8.2)
  In-Reply-To: <46B7A7CE.3030900@otg-nc.com>

* 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