3 ms·
>> There can only be one main node at one time This is how most distributed system solve the consensus problem: the nodes automatically run leader election alg
by dikei 5y ago
>> There can only be one main node at one time
This is how most distributed system solve the consensus problem: the nodes automatically run leader election algorithm so that eventually only one leader remains.
>> (Secretly not so simple, all of the above problems are actually hugely important to resolve in any monolithic database. However, Postgres sorts it out for you.)
Except that in case of network partition of the primary node, Postgres can't promote a new primary node from the replicas automatically, unlike consensus systems such as ETCD/Zookeeper.