简体   繁体   English

PostgreSQL 9.2流复制

[英]PostgreSQL 9.2 Streaming Replication

Is there any way to Switchover the role of Master & Slave FREQUENTLY and synchronize Slave with Master and vice-verse? 有什么方法可以频繁地切换主从设备的角色,并使从设备与主从设备同步,反之亦然?

Let see my network of machine goes off for 5 minutes on Master, then my Slave became the Master, but when my old Master network problem solved, then instead of building old Master with 'rsync' command, is there any possible way to synchronize old Master with only those changes made within 5 minutes? 让我们看一下我的计算机网络在Master上关闭5分钟,然后我的Slave成为Master,但是当我的旧Master网络问题解决后,可以使用同步任何旧方法代替使用'rsync'命令构建旧的Master掌握5分钟之内所做的更改?

Hoping for expert reply. 希望得到专家的答复。

i have been working on postgresql replication right now you have not give proper description about your problem 1) how you down the master killing postgres process or stop the master 我一直在进行postgresql复制,现在您还没有对问题进行适当的描述1)如何降低master杀死postgres进程或停止master的工作

there is no solution when master down using killing postgres except rsync because when master kill down master may have committed locally so there is inconsistency in data of master and slave due to master go ahead and slave left behind so next when old master try to came up as slave it will try to redo log at last checkpoint but it will not find that wal file from new master (old slave). 当除rsync之外的master主机使用killing postgres时,主机没有任何解决方案,因为当master主机down时,master可能已本地提交,因此master和slave的数据不一致,这是由于master继续运行而slave被抛在后面,因此当旧master尝试启动时作为从站,它将尝试在最后一个检查点重做日志,但不会从新的主站(旧从站)中找到该wal文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM