If use these tools can make a great modern database cluster with full features:

  • pgbouncer (with HAProxy for HA)
  • repmgr
  • barman

The main database will run on the repmgr servers. It has primary and standby. If primary down, standby can up. But will take some seconds. At that time, user can't access the database by pending? Isn't there has a good way to make realtime response?

2 Answers 2


With all high-availability solutions you will always have some down-time during a failover, typically less than a minute.

The reason is that the clusterware has to determine reliably that a member is down before it can fail over. That means that failover is only initiated after several attempt to communicate with the cluster member have failed.

You can reduce failover time by making these tests try less often, but that increases the risk of an unnecessary failover (for example, caused by a one-time network glitch). Unnecessary failovers reduce the total uptime of your database, so you don't win anything that way.

  • Very professional and clear answer. Thank you very much!
    – rawmain
    Mar 10, 2020 at 0:19

Try PgpoolII or PGpool with Regmgr 1. Opensource 2. High Available 3. Pool connection with single external db access port

To reach reasonable high availabe, I think you need has at least 3 servers.

Here is the pgpoolII online document of how to create robust cluster system and avoid the single point of failure or split brain Cluster System Configuration

Diagram source


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.