postgresql启动失败
查看postgresql
cat logfile
FATAL: pre-existing shared memory block (key 5432001, ID 180125706) is still in use
HINT: If you're sure there are no old server processes still running, remove the shared memory block or just delete the file "postmaster.pid".
翻译
致命:已存在的共享内存块(密钥5432001,ID 180125706)仍然在使用
提示:如果您确定没有旧的服务器进程仍在运行,请删除共享内存块或删除文件“postmaster.pid”。
查看端口netstat -lantp
查看postgresql数据库状态
为了防止这样的悲剧再次重演,我惟有在/etc/rc.local里加上一条
postgres@ubuntu:~$
rm -rf /var/lib/pgsql/data/postmaster.pid 2 > /dev/nullir9©skylove.study-area.org
然后再启动postgresql服务…
参考链接
(转)非法关机的时候,postgresql启动故障的解决
http://blog.chinaunix.net/uid-20379093-id-2993706.html