[root@psql-41 ~]# systemctl restart postgresql-12
Job for postgresql-12.service failed because the control process exited with error code. See "systemctl status postgresql-12.service" and "journalctl -xe" for details.
4月 30 15:38:47 psql-41 postmaster[39785]: 2024-04-30 15:38:47.965 CST [39785] 日志: 正在监听IPv6地址"::",端口 5432
4月 30 15:38:47 psql-41 postmaster[39785]: 2024-04-30 15:38:47.966 CST [39785] 日志: 在Unix套接字 "/var/run/postgresql/.s.PGSQL.5432"上侦听
4月 30 15:38:47 psql-41 postmaster[39785]: 2024-04-30 15:38:47.971 CST [39785] 日志: 在Unix套接字 "/tmp/.s.PGSQL.5432"上侦听
4月 30 15:38:48 psql-41 postmaster[39785]: 2024-04-30 15:38:48.004 CST [39785] 日志: 日志输出重定向到日志收集进程
4月 30 15:38:48 psql-41 postmaster[39785]: 2024-04-30 15:38:48.004 CST [39785] 提示: 后续的日志输出将出现在目录 "log"中.
4月 30 15:38:48 psql-41 systemd[1]: postgresql-12.service: main process exited, code=exited, status=1/FAILURE
4月 30 15:38:48 psql-41 systemd[1]: Failed to start PostgreSQL 12 database server.
-- Subject: Unit postgresql-12.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-12.service has failed.
--
-- The result is failed.
4月 30 15:38:48 psql-41 systemd[1]: Unit postgresql-12.service entered failed state.
4月 30 15:38:48 psql-41 systemd[1]: postgresql-12.service failed.
4月 30 15:38:48 psql-41 polkitd[655]: Unregistered Authentication Agent for unix-process:39774:255499 (system bus name :1.26, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale zh_CN.UTF-8)
~
我在配置好主库后,按照流程配置从库:停止从库--》清空从库数据文件--》拉取主库数据文件--》修改权限--》修改从库 postgresql.conf 文件参数,一切都没问题,然后准备重启重库,结果报错,就是上图,和老师查了各种配置,都没解决,最后都删除虚拟机重新搞,结果还是到这里卡住。
实在没办法,我选择手写一下配置,不直接复制粘贴,没错,之前我是复制文档上的,然后,它就成功了,鬼知道为什么我同学可以直接复制,我就不行,就离谱。
解决方法:
手敲,别复制粘贴