Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 重新启动postgres服务时出现的问题_Postgresql - Fatal编程技术网

Postgresql 重新启动postgres服务时出现的问题

Postgresql 重新启动postgres服务时出现的问题,postgresql,Postgresql,我已将postgres版本更新为9.5(使用yum update) 当我试图通过以下方式查看postgres版本时: postgres --version postgres (PostgreSQL) 9.2.23 有postgres服务正在运行。我通过以下方式确认: systemctl list-unit-files | grep postg postgresql.service enabled 当我试图通过以下方式停止运行postgr

我已将postgres版本更新为9.5(使用yum update)

当我试图通过以下方式查看postgres版本时:

postgres --version
postgres (PostgreSQL) 9.2.23
有postgres服务正在运行。我通过以下方式确认:

systemctl list-unit-files  | grep postg
postgresql.service                            enabled
当我试图通过以下方式停止运行postgres服务时:

/etc/init.d/postgresql.service stop
bash: /etc/init.d/postgresql.service: No such file or directory
我试图启动postgres服务,但没有给我类似的文件或目录问题

当我试图挖掘日志时,我发现了如下内容

postgresql.service: control process exited, code=exited status=1
Feb 07 16:06:10 punessgdev2 systemd[1]: Failed to start PostgreSQL database 
server.

我该如何进行?非常感谢您的帮助。

$sudo systemctl status/start/restart postgresql.service
对我来说很好DEBIAN 9 POSTGRES 9.6.15

$sudo systemctl status/start/restart postgresql.service
DEBIAN 9 POSTGRES 9.6.15对我来说工作正常首先,请说明您的操作系统平台。看起来您正在使用基于systemd的Linux。第二,“enabled”只是表示服务可以启动。请使用
systemctl status postgres.service
获得准确答案。第三:您应该使用
systemctl start\u service\u
启动/重新启动服务,而不使用控制文件可能所在位置的任何假设。@rpy我正在linux平台上工作
systemctl状态postgres.service
给我
单元postgres.service找不到。
对不起,可能不好。应该是
postgresql.service
。点击
systemctl status postgresql.service
,这就是我得到的
postgresql.service:control process exited,code=exited status=1 systemd[1]:无法启动postgresql数据库服务器。systemd[1]:单元postgresql.service进入失败状态。systemd[1]:postgresql.service失败。
然后您可以尝试重新开始:
systemctl启动postgresql.service
。之后,
systemctl status postgresql.service
可能会透露更多细节。看起来安装过程中出现了一些问题。抱歉,在这方面无法提供更多帮助。首先,请说明您的操作系统平台。看起来您正在使用基于systemd的Linux。第二,“enabled”只是表示服务可以启动。请使用
systemctl status postgres.service
获得准确答案。第三:您应该使用
systemctl start\u service\u
启动/重新启动服务,而不使用控制文件可能所在位置的任何假设。@rpy我正在linux平台上工作
systemctl状态postgres.service
给我
单元postgres.service找不到。
对不起,可能不好。应该是
postgresql.service
。点击
systemctl status postgresql.service
,这就是我得到的
postgresql.service:control process exited,code=exited status=1 systemd[1]:无法启动postgresql数据库服务器。systemd[1]:单元postgresql.service进入失败状态。systemd[1]:postgresql.service失败。
然后您可以尝试重新开始:
systemctl启动postgresql.service
。之后,
systemctl status postgresql.service
可能会透露更多细节。看起来安装过程中出现了一些问题。对不起,我帮不了你,请解释一下!请解释一下!