045.PGSQL-启动数据库报错Job for postgresql-13.service failed because the control process exited with error code. See "systemctl status postgresql-13.service" and "journalctl -xe" for details.
[root@s101 /var/lib/pgsql/13/data]#sudo systemctl restart postgresql-13
Job for postgresql-13.service failed because the control process exited with error code. See "systemctl status postgresql-13.service" and "journalctl -xe" for details.
解决办法 journalctl -xe 查看日志
配置文件有书写错误
[root@s101 /var/lib/pgsql/13/data]#journalctl -xe
Aug 03 05:58:41 s101 sudo[57753]: root : TTY=pts/1 ; PWD=/var/lib/pgsql/13/data ; USER=root ; COMMAND=/bin/systemctl restart postgresql-13
Aug 03 05:58:41 s101 polkitd[606]: Registered Authentication Agent for unix-process:57754:131258586 (system bus name :1.1018 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Aug 03 05:58:41 s101 polkitd[606]: Unregistered Authentication Agent for unix-process:57754:131258586 (system bus name :1.1018, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Aug 03 05:58:41 s101 systemd[1]: Starting PostgreSQL 13 database server...
-- Subject: Unit postgresql-13.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-13.service has begun starting up.
Aug 03 05:58:41 s101 systemd[1]: postgresql-13.service: main process exited, code=exited, status=1/FAILURE
Aug 03 05:58:41 s101 systemd[1]: Failed to start PostgreSQL 13 database server.
-- Subject: Unit postgresql-13.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-13.service has failed.
--
-- The result is failed.
Aug 03 05:58:41 s101 systemd[1]: Unit postgresql-13.service entered failed state.
Aug 03 05:58:41 s101 postmaster[57765]: 2021-08-02 21:58:41.154 GMT [57765] LOG: syntax error in file "/var/lib/pgsql/13/data/postgresql.conf" line 661, near token ","
Aug 03 05:58:41 s101 postmaster[57765]: 2021-08-02 21:58:41.154 GMT [57765] FATAL: configuration file "/var/lib/pgsql/13/data/postgresql.conf" contains errors
Aug 03 05:58:41 s101 systemd[1]: postgresql-13.service failed.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
2020-08-03 006.PGSQL-数据倾斜、数据各节点分布情况;创建序列、创建分布式表distribute by hash(列名)