VMware postgres failed to start with error "FATAL: WAL ends before end of online backup"
search cancel

VMware postgres failed to start with error "FATAL: WAL ends before end of online backup"

book

Article ID: 296378

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

One customer accidentally reboots the host before shutting down the database, when start the database, it's reporting the error below:
rred more than once some data might be corrupted and you might need to choose an earlier recovery target.
:LOG:  starting archive recovery
:LOG:  restored log file "000000xx.history" from archive
:LOG:  restored log file "000000xx00000xx0000007F" from archive
:LOG:  redo starts at xxx/7F000xxx
:LOG:  invalid record length at xxx/7F000xxx: wanted 24, got 0
:LOG:  redo done at xxx/7F00xxxx
:LOG:  restored log file "000000xx00000xxxxxxxxx" from archive
:FATAL:  WAL ends before end of online backup
:HINT:  Online backup started with pg_start_backup() must be ended with pg_stop_backup(), and all WAL up to that point 
:LOG:  startup process (PID xxxxxx) exited with exit code 1
:LOG:  terminating any other active server processes
:LOG:  database system is shut down
:LOG:  database system was interrupted while in recovery at log time "yyyy-mm-dd" GMT
:HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery 
:LOG:  starting point-in-time recovery to WAL location (LSN) "xxx/7F0xxxxxx"
:LOG:  restored log file "000000xx.history" from archive
:LOG:  restored log file "000000xx00000991000xxxxx" from archive
:LOG:  redo starts at xxx/7F0000xxx
:LOG:  invalid record length at xxxx/7F000xxxx wanted 24, got 0
:LOG:  redo done at xxx/7F000xxx
:LOG:  restored log file "000000xx000009910000xxxxx" from archive
:FATAL:  WAL ends before end of online backup
:HINT:  Online backup started with pg_start_backup() must be ended with pg_stop_backup(), and all WAL up to that point 
:LOG:  startup process (PID xxxxxxx) exited with exit code 1
:LOG:  terminating any other active server processes
:LOG:  database system is shut down
:LOG:  database system was interrupted while in recovery at log time "yyyy-mm-dd" GMT
:HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery 
:LOG:  starting point-in-time recovery to WAL location (LSN) "xxxx/xxxxx"
:LOG:  restored log file "000000xx.history" from archive
:LOG:  restored log file "000000xx000009910000xxxx" from archive
:LOG:  redo starts at xxx/7F0000xx
:LOG:  recovery stopping after WAL location (LSN) "xxx/7F000xxx"
:FATAL:  requested recovery stop point is before consistent recovery point
:LOG:  startup process (PID xxxxxx) exited with exit code 1
:LOG:  terminating any other active server processes
:LOG:  database system is shut down


Environment

Product Version: 11.5

Resolution

After removing the recovery.conf file from the postgres data directory, the database can be started. The recovery.conf file may be left there from the previous restore.