Job for postgresql-11.service failed because the control process exited with error code. See "systemctl status postgresql-11.service" and "journalctl -xe" for details.。
这个问题运行journalctl -xe可以查看问题,有一部分问题到本人博客:(20条消息) Linux postgres 无法访问文件 “decoderbufs“: 没有那个文件或目录_DreamBoat_2048的博客-优快云博客https://blog.youkuaiyun.com/DREAM_BOAT_1/article/details/131872739?spm=1001.2014.3001.5502有解决方案。
这个问题是指启动服务失败,可以查看服务状态或者运行journalctl -xe可以查看问题,下面是运行journalctl -xe可以查看问题的示例
[root@host14 postgres-decoderbufs-1.7.0.Final]# journalctl -xe
7月 22 20:48:12 host14 systemd[1]: Starting PostgreSQL 11 database server...
-- Subject: Unit postgresql-11.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-11.service has begun starting up.
7月 22 20:48:12 host14 postmaster[2532]: 2023-07-22 20:48:12.110 CST [2532] 致命错误: 锁文件 "postmaster.pid" 已经存在
7月 22 20:48:12 host14 postmaster[2532]: 2023-07-22 20:48:12.110 CST [2532] 提示: 是否其它 postmaster (PID 32279) 运行在数据目录 "/var/lib/pgsql/11/data"?
7月 22 20:48:12 host14 systemd[1]: postgresql-11.service: main process exited, code=exited, status=1/FAILURE
7月 22 20:48:12 host14 systemd[1]: Failed to start PostgreSQL 11 database server.
-- Subject: Unit postgresql-11.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-11.service has failed.
--
-- The result is failed.