HA and Automatic Failover with PostgreSQL The most popular third-party tools are pgpool and regmgr.

pgpool can do HA and automatic failover, regmgr can also do replication and automatic failover. Some articles show using both of them to do in the cluster. Why? What's the best practices go to the goal?
pgPool is a client tool that can reroute client connections to the surviving server aftet the primary has died. However, without further activity, that surviving server will be a streaming replication standby, that is a read-only server.

You also need some software that can reliably detect that the primary server is down and promote a standby server. Such a clusterware is an integral component of a high-availability setup.

Probably Repmgr can serve that purpose; typically, Patroni is used.