当前位置:首页 > 开发 > 数据库 > 正文

PostgreSQL 启动失败

发表于: 2015-03-05   作者:amspring   来源:转载   浏览:
摘要: * Starting PostgreSQL 9.1 database server                          &nb

* Starting PostgreSQL 9.1 database server                                                                                                                                                      * Removed stale pid file.
The PostgreSQL server failed to start. Please check the log output:
2015-03-05 15:41:57 GMT FATAL:  could not remove old lock file "postmaster.pid": Operation not permitted
2015-03-05 15:41:57 GMT HINT:  The file seems accidentally left over, but it could not be removed. Please remove the file by hand and try again.

解决方式:

root@db38bdb26696: /var/lib/postgresql/9.1/main# ls
PG_VERSION  base  global  pg_clog  pg_multixact  pg_notify  pg_serial  pg_stat_tmp  pg_subtrans  pg_tblspc  pg_twophase  pg_xlog  postmaster.opts  postmaster.pid  server.crt  server.key

删除 postmaster.pid

rm postmaster.pid

root@db38bdb26696:/var/run/postgresql# ll
total 16
drwxrwsr-x  2 postgres postgres 4096 Mar  5 23:43 ./
drwxr-xr-x 11 root     root     4096 Feb  9 15:10 ../
srwxrwxrwx  1 postgres postgres    0 Mar  5 23:43 .s.PGSQL.5432=
-rw-------  1 postgres postgres   70 Mar  5 23:43 .s.PGSQL.5432.lock
-rw-------  1 postgres postgres    5 Mar  5 23:43 9.1-main.pid

删除 .s.PGSQL.5432= 和 .s.PGSQL.5432.lock

再重启动就ok了
sudo /etc/init.d/postgresql start
* Starting PostgreSQL 9.1 database server 


PostgreSQL 启动失败

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号