无法启动时,应该看一下logfile发生了什么事: vi /home/postgres/logfile, 一般突然断电关机会留下pid文件未删除导致出现pre-existing shared memory block这个错误, 删除postmaster.pid即可.
[root@DGNEWDEV system]# ll /live/db/data/postmaster.pid
-rw------- 1 postgres postgres 77 Feb 13 11:48 /live/db/data/postmaster.pid
[root@DGNEWDEV system]# rm /live/db/data/postmaster.pid
rm: remove regular file ‘/live/db/data/postmaster.pid’? y
[root@DGNEWDEV system]# service postgres start
Starting postgres:
postgres started. Its log is kept as /home/postgres/logfile.
[root@DGNEWDEV system]# service postgres status
pg_ctl: server is running (PID: 1904)
/usr/pgsql-9.4/bin/postgres "-i" "-D" "/live/db/data"
[root@DGNEWDEV system]#
4045

被折叠的 条评论
为什么被折叠?



