Search Postgresql Archives

Unable to start postgres in recovery mode.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to put my database in recovery mode and I get the following error:

===========
LOG:  starting archive recovery
LOG:  restore_command = "/myrestore/pg_restore.sh %f %p"
00000001.history pg_xlog/RECOVERYHISTORY
[Main]: Server requested for 00000001.history to be copied to
pg_xlog/RECOVERYHISTORY
[pg_restore::isWALFileReady]: 1 Available WAL Files
[Main]: Request to copy 00000001.history to pg_xlog/RECOVERYHISTORY
[pg_restore]::copyWALFile: Moving
/mybackup/000000010000000000000001.009352E8.backup to
pg_xlog/RECOVERYHISTORY
LOG:  restored log file "00000001.history" from archive
FATAL:  syntax error in history file: START WAL LOCATION: 0/19352E8
(file 000000010000000000000001)

HINT:  Expected a numeric timeline ID.
LOG:  startup process (PID 12323) exited with exit code 1
LOG:  aborting startup due to startup process failure

===========

In the log above, the logs with [Main] or [pg_restore] is my script
which is called by the recovery.conf.

The postgres server is asking for 00000001.history file and I do not
have that file. All I have is the 0*10*1.009352E8.backup file and
other WAL files starting from 0*10*1. In the above case, I move
0*10*1.009352E8.backup pg_xlog/RECOVERYHISTORY. Note that my backup is
on a staging area and I can therefore move safely.

What am I doing wrong?

If I indicate that I do not have the concerned file by returning error
code 1, I get the following error in the log:

============
LOG:  starting archive recovery
LOG:  restore_command = "/myrestore/pg_restore.sh %f %p"
00000001.history pg_xlog/RECOVERYHISTORY
[Main]: Server requested for 00000001.history to be copied to
pg_xlog/RECOVERYHISTORY
00000001000000000000004F pg_xlog/RECOVERYXLOG
[Main]: Server requested for 00000001000000000000004F to be copied to
pg_xlog/RECOVERYXLOG
LOG:  could not open file "pg_xlog/00000001000000000000004F" (log file
0, segment 79): No such file or directory
LOG:  invalid primary checkpoint record
00000001000000000000004F pg_xlog/RECOVERYXLOG
[Main]: Server requested for 00000001000000000000004F to be copied to
pg_xlog/RECOVERYXLOG
LOG:  could not open file "pg_xlog/00000001000000000000004F" (log file
0, segment 79): No such file or directory
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 12222) was terminated by signal 6
LOG:  aborting startup due to startup process failure
LOG:  database system was shut down at 2007-03-19 03:33:05 PDT
==============

So what am I doing wrong here? Any help in the above matter is greatly
appreciated.

Regards
Dhaval


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux