以下是Patroni https://patroni.readthedocs.io/en/latest/replication_modes.html的文档。
有两个选项: maximum_lag_on_failover和synchronous_mode。
在项目中,我看到设置了这两个选项(synchronous_mode: true,maximum_lag_on_failover: 1048576 )。这有意义吗?
一个是说你可以用1048576字节的延迟将次要文件提升到主要文件,第二个是如果你有任何延迟就不能把次要文件升级到主要文件。第二个问题是,maximum_lag_on_failover是否仅适用于异步复制,而synchronous_mode是否仅适用于同步复制?
发布于 2021-07-08 18:15:33
我没有足够的名气来发表评论,但是,我认为maximum_lag_on_failover仍然可以与synchronous_mode: true一起使用,因为正如文档中所说:Turning on synchronous_mode does not guarantee multi node durability of commits under all circumstances. When no suitable standby is available, primary server will still accept writes, but does not guarantee their replication.。因此,为了提供可用性,在synchronous_mode中仍然允许丢失一些事务。另外,如果我没记错的话,在我们的项目中,我们设置了两个选项,一切都正常工作。另一个问题是:是否可以将maximum_lag_on_failover与synchronous_mode_strict: true一起使用
https://stackoverflow.com/questions/65294993
复制相似问题