Re: Question on Wal time lines - Mailing list pgsql-general

From Greg Smith
Subject Re: Question on Wal time lines
Date
Msg-id 4DC1029C.5020003@2ndquadrant.com
Whole thread Raw
In response to Question on Wal time lines  (dabicho <tsukebumi@gmail.com>)
List pgsql-general
dabicho wrote:
>
> For restoring a database from wal files, if I omit a target on the
> recovery.conf file, can I make it so the database continues the time
> line instead of starting one?
> Or is there a tool to pick the most recent time line from a bunch of
> wal files?
>

When recovery finishes, you get a new timeline.  That way it's always
possible to distinguish between a server that's exited recovery, and
started generating new WAL data, from one that is still sync'd to the
master and running recovery of the original timeline.  If you don't want
a new timeline, don't let recovery finish.

As for the options you can tweak, see
http://www.postgresql.org/docs/9.0/static/continuous-archiving.html#BACKUP-TIMELINES
and the recovery target parameters at
http://www.postgresql.org/docs/9.0/static/recovery-target-settings.html
You can navigate among multiple timelines in a set of WAL files using
recovery_target_timeline and the other target settings.  It really is
worth the trouble to run some experiments with these ideas to see what
you can do, before you're forced to do so by an emergency.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: Bidirectional replication
Next
From: tushar nehete
Date:
Subject: Re: Bidirectional replication