服务器 Gind.cn

服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器

Ubuntu 2节点群集Postgresql 9.3与起搏器和stream式复制

我正在尝试使用Postresql 9.3和Streaming Replication来设置2节点群集。 stream式复制已成功configuration。 师父正在收听,正在发送给奴隶。 我可以通过使用rsync更新数据目录创build触发文件和故障恢复主服务器来手动执行故障转移,将旧的主服务器再次作为从服务器升级为故障转移。 在这一点上,一切工作正常。 现在我想用起搏器设置虚拟(浮动)IP的自动故障转移。 主设备总是要让VIP接受客户端连接进行读写操作。 如果作为master的postgresql服务closures,故障转移应该触发一个浮动IP应该移到slave(新的master) 我尝试通过以下configuration指南https://github.com/t-matsuo/resource-agents/wiki/Resource-Agent-for-PostgreSQL-9.1-streaming-replication https://github.com/t-matsuo/资源代理/维基,但不幸的是,postgres不是由起搏器启动的,只有vip-master被分配给首先启动的主机。 我的心脏起搏器configuration是: property \ no-quorum-policy="ignore" \ stonith-enabled="false" \ crmd-transition-delay="0s" primitive pgsql ocf:heartbeat:pgsql \ params \ pgctl="/usr/bin/pg_ctlcluster" \ psql="/usr/bin/psql" \ pgdata="/database/postgresql/9.3/main/" \ start_opt="-p 5432" \ rep_mode="sync" \ node_list="robin marshall" \ restore_command="" \ primary_conninfo_opt="keepalives_idle=60 keepalives_interval=5 keepalives_count=5" \ master_ip="172.16.1.1" \ stop_escalate="0" \ op start timeout="60s" interval="0s" on-fail="restart" […]