我已经将 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 状态/启动/重启 postgresql.service 对我来说工作正常 DEBIAN 9 POSTGRES 9.6.15
关于postgresql - 重启postgres服务的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48661793/