Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2010
    Posts
    2

    Unanswered: Postgres 9.0 - Recovery with WAL

    I am new to Postgres and have a question. I have been attempting to develop a backup procedure for our system hosted on PostgreSQL 9.0 on Windows Server 2008 R2. I have been doing various backup and recoveries and all was going well until I hit this snag. I was testing 'timelines' in Postgres and I can't seem to get the procedure to work. Until this point, I had just been setting the recovery_target_time and restore_command settings. Here is my scenario:

    1. Restore database w/ archiving turned on with only the 'restore_command' set in recovery.conf.

    2. I checked my WAL archive folder and verify that a new timeline was indeed created.

    3. I attempt to restore using the same backup as in step 1, only this time I specify the 'recovery_target_timeline' setting in recovery.conf to the new timeline and it fails with the following messages in the log:

    2010-12-08 13:21:08 CST LOG: database system was interrupted; last known up at 2010-12-08 12:08:31 CST
    2010-12-08 13:21:08 CST LOG: creating missing WAL directory "pg_xlog/archive_status"
    2010-12-08 13:21:08 CST LOG: starting point-in-time recovery to 2010-12-08 12:10:50-06
    2010-12-08 13:21:08 CST FATAL: the database system is starting up
    2010-12-08 13:21:08 CST LOG: restored log file "000000010000000000000030" from archive
    2010-12-08 13:21:08 CST LOG: record with zero length at 0/30000078
    2010-12-08 13:21:08 CST LOG: redo is not required
    2010-12-08 13:21:08 CST FATAL: WAL ends before consistent recovery point
    2010-12-08 13:21:08 CST LOG: startup process (PID 1884) exited with exit code 1
    2010-12-08 13:21:08 CST LOG: terminating any other active server processes

    Any ideas what is going on here? I'm guessing I'm doing something wrong regarding the timelines. Any thoughts would be greatly appreciated.

    Thanks!
    Adam

  2. #2
    Join Date
    Dec 2010
    Posts
    2

    Correction to error message

    I posted the wrong error message in my earlier post, the correct one is:

    2010-12-08 13:29:18 CST LOG: database system was interrupted while in recovery at log time 2010-12-08 12:08:31 CST
    2010-12-08 13:29:18 CST HINT: If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
    2010-12-08 13:29:18 CST LOG: starting archive recovery
    2010-12-08 13:29:18 CST LOG: restored log file "000000010000000000000030" from archive
    2010-12-08 13:29:18 CST LOG: record with zero length at 0/30000078
    2010-12-08 13:29:18 CST LOG: redo is not required
    2010-12-08 13:29:18 CST FATAL: WAL ends before consistent recovery point
    2010-12-08 13:29:18 CST LOG: startup process (PID 2620) exited with exit code 1
    2010-12-08 13:29:18 CST LOG: terminating any other active server processes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •