我正在尝试使用3台机器设置Postgres集群,以获得具有自动故障转移功能的高可用性。
postgres-01 --> master
postgres-02 --> sync replica
postgres-03 --> async replica当我尝试在postgresql.conf中使用synchronous_standby_names='postgres-02'时,它无法重新启动postgres,并显示以下错误
LOG: invalid value for parameter "synchronous_standby_names": "postgres-02"
DETAIL: syntax error at or near "-"
FATAL: configuration file "/pgsql/postgresql.conf" contains errors
postgresql-10.service: main process exited, code=exited, status=1/FAILURE
Failed to start PostgreSQL 10 database server.
-- Subject: Unit postgresql-10.service has failed
-- Defined-By: systemd从主机名中删除'-‘可以解决这个问题,但这真的是必需的吗?
发布于 2019-03-14 20:46:57
你必须引用这个名字:
synchronous_standby_names = '"postgres-02"'您应该至少有两个同步备用服务器,否则如果单个同步备用服务器宕机,您的系统将停止工作。
https://stackoverflow.com/questions/55162303
复制相似问题