docker容器中啟動postgresql 9.5失敗:could not locate a valid checkpoint record


docker 運行postgresql(9.5)出現 could not locate a valid checkpoint record,解決辦法:

 原因是日志文件對不上(我也不知道對不上是什么意思)

PGSQL invalid primary checkpoint record could not locate a valid checkpoint record

 在終端運行以下命令:

docker run -it  -v /root/postgres:/var/lib/postgresql/data postgres /bin/bash 

  其中:/root/postgres 是容器外數據文件映射位置,postgres 是image名稱,也可以用ID代替

gosu postgres pg_resetxlog -f /var/lib/postgres/data

  注意:pg_resetxlog 是postgresql 11 以前版本的命令,11以后版本用 pg_resetwal

 

 




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM