先檢查 Log 內容看是出現什麼樣的錯誤
不然瞎猜可是會吃錯藥的
出問題當時錯誤訊息
2016-02-25 14:41:02 CST LOG: database system is ready to accept connections
2016-02-25 14:41:03 CST LOG: autovacuum launcher started
2016-02-25 15:47:19 CST LOG: could not receive data from client: No connection could be made because the target machine actively refused it.
2016-02-25 15:47:19 CST LOG: unexpected EOF on client connection
2016-02-25 15:49:03 CST LOG: could not receive data from client: No connection could be made because the target machine actively refused it.
2016-02-25 15:49:03 CST LOG: unexpected EOF on client connection
2016-02-25 15:49:43 CST LOG: could not receive data from client: No connection could be made because the target machine actively refused it.
2016-02-25 15:49:43 CST LOG: unexpected EOF on client connection
之後無法啟動的問題
2016-03-01 12:34:26 CST FATAL: the database system is starting up
2016-03-01 12:34:26 CST LOG: database system was interrupted; last known up at 2016-03-01 11:27:25 CST
2016-03-01 12:34:27 CST LOG: database system was not properly shut down; automatic recovery in progress
2016-03-01 12:34:27 CST FATAL: the database system is starting up
2016-03-01 12:34:28 CST LOG: record with zero length at 0/50B21D0
2016-03-01 12:34:28 CST LOG: redo is not required
2016-03-01 12:34:28 CST FATAL: the database system is starting up
2016-03-01 12:34:29 CST FATAL: the database system is starting up
2016-03-01 12:34:30 CST FATAL: the database system is starting up
2016-03-01 12:34:32 CST FATAL: the database system is starting up
2016-03-01 12:34:32 CST LOG: database system is ready to accept connections
2016-03-01 12:34:32 CST LOG: autovacuum launcher started
只知道連接被拒絕後就無法重啟
看 PostgreSQL Log 內容資料庫服務是已經自動修復並完成啟動且接受連線
一層一層檢查先不要管 [原料驗收系統] 是否正常
在資料庫本機用工具確認例如 PgAdmin 或命令列 psql 方式連接資料庫
確認帳號密碼是可以通過驗證,無法通過就重新設定
不知道怎麼處理就委外吧