【发布时间】:2019-03-14 12:14:35
【问题描述】:
我正在尝试使用 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
从主机名中删除“-”可以解决问题,但这真的需要吗?
【问题讨论】:
标签: postgresql database-replication postgresql-10