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@xxxxxxxxxxxxxxx Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general