Re: Question on Wal time lines

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: tsukebumi(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question on Wal time lines
Date: 2011-05-04 07:39:08
Message-ID: 4DC1029C.5020003@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Browse pgsql-general by date

  From Date Subject
Next Message tushar nehete 2011-05-04 07:44:24 Re: Bidirectional replication
Previous Message Greg Smith 2011-05-04 07:29:35 Re: Bidirectional replication