這是PostgreSQL的時候嘗試斷電後啓動時會發生什麼:修復損壞的PostgreSQL數據庫
2012-01-27 18:00:44 MSK LOG: database system was interrupted while in recovery at 2012-01-27 18:00:16 MSK
2012-01-27 18:00:44 MSK HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery.
2012-01-27 18:00:44 MSK LOG: database system was not properly shut down; automatic recovery in progress
2012-01-27 18:00:44 MSK LOG: consistent recovery state reached at 17/762C39B8
2012-01-27 18:00:44 MSK LOG: redo starts at 17/761F6A40
2012-01-27 18:00:44 MSK FATAL: invalid page header in block 311757 of relation base/26976/27977
2012-01-27 18:00:44 MSK CONTEXT: xlog redo insert: rel 1663/26976/27977; tid 311757/44
2012-01-27 18:00:44 MSK LOG: startup process (PID 392) exited with exit code 1
2012-01-27 18:00:44 MSK LOG: aborting startup due to startup process failure
我知道我不是運氣不好,有一個命令,我可以用它來修復在這種情況下的數據庫。只要數據庫變得一致,交易的最後幾個小時是否消失並不重要。
請告訴我該怎麼做。
屬於dba.stackexchange.com – Aaron 2012-01-27 14:45:32