2016-03-01 53 views
1

杀不了由于削减PostgreSQL的突然断电9.3数据库服务器(CentOS的)下跌,我试图启动/停止/重新启动Postgres的服务器收到此错误:无法重新启动Postgres的服务器和过程

[[email protected]~]# service postgresql-9.3 restart 

    Restarting PostgreSQL 9.3: 
    pg_ctl: PID file "/opt/PostgreSQL/9.3/data/postmaster.pid" does not exist 
    Is server running? 
    starting server anyway 
    waiting for server to start........ stopped waiting 
    pg_ctl: could not start server 
    Examine the log output. 
    PostgreSQL 9.3 did not start in a timely fashion, please see /opt/PostgreSQL/9.3/data/pg_log/startup.log for details 

以下消息是在startup.log文件

2016-03-01 23:24:18 IST LOG: redirecting log output to logging collector process 
2016-03-01 23:24:18 IST HINT: Future log output will appear in directory "pg_log". 

我找到了计算器的问题,但没有解决方案。 postgresql-service-unable-to-stop-start-restart unable-to-restart-postgresql-server

回答

0

我与postmaster.pid遇到了类似的问题,前一段时间。对我来说,问题在于它没有被删除,因此无法重新启动。对你来说,postmaster.pid似乎并不存在,它预计会在那里。

如果postmaster.pid确实不存在,你检入了“/opt/PostgreSQL/9.3/data/”吗?那时我发现这是一个文件,可以保护您在同一张桌子上进行多次调用。所以也许另一个数据库正在处理相同的表或类似的东西?希望答案可以给你一些方向。

祝你好运。

+0

里面的“/选择/ PostgreSQL/9.3/data /“没有postmaster.pid文件。 – Pirinthan

0

您可以尝试在

ps aux 

搜索Postgres的PID,当你找到它,你可以使用

kill -9 postgresPID 

杀死它,我不知道这是否帮助你,但它的工作为了我。

+0

通常我使用上面的命令。它的工作,但这次上面的命令没有奏效。 – Pirinthan

1

如果PID文件不存在,请检查所有使用postgresql数据库的空闲会话。 ps -ef | grep postgres 使用postgresql杀死所有会话。 检查数据库 pg_ctl状态 pg_ctl的状态:没有服务器运行

启动服务器后: pg_ctl启动 服务器开始 的Postgres @服务器:〜$ 2016年3月2日11: 44:10 IST日志:将日志输出重定向到日志收集器进程 2016-03-02 11:44:10 IST提示:将来的日志输出将出现在目录“pg_log”中。

检查状态 pg_ctl状态

pg_ctl:服务器正在运行(PID:51615) /opt/postgres/9.3/bin/postgres