You can use the replication manager tool suite to check the connectivity between the nodes in your database high availability cluster.

Procedure

  1. Log in or SSH as root to the OS of any of the running cells in the cluster.
  2. Change the user to postgres.
    sudo -i -u postgres
  3. Check the connectivity of the cluster.
    • The repmgr cluster matrix command runs the repmgr cluster show command on each node of the cluster and presents the result as a matrix.
      /opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf cluster matrix

      In the following example, node 1 and node 2 are up, and node 3 is down. Each row corresponds to one server and represents the result of testing an outbound connection from that server.

      The three entries in the third row are marked with a ? symbol because node 3 is down and there is no information on its outbound connections.

                 Name| Id |  1 |  2  |  3
            ---------+----+----+----+----
              node 1 |  1 |  * |  * |  x
              node 2 |  2 |  * |  * |  x
              node 3 |  3 |  ? |  ? |  ?
    • The repmgr cluster crosscheck command crosschecks the connections between each combination of nodes and might provide a better overview of the cluster connectivity.
      /opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf cluster crosscheck

      In the following example, the node from which you run the repmgr cluster crosscheck command merges its cluster matrix system output with the output from the other nodes and does a crosscheck between the nodes. In this case, all nodes are up, but the firewall drops packets originating from node 1 and directed at node 3. This is an example of an asymmetric network partition, where node1 cannot send packets to node3.

                 Name| Id |  1 |  2  |  3
            ---------+----+----+----+----
              node 1 |  1 |  * |  * |  x
              node 2 |  2 |  * |  * |  *
              node 3 |  3 |  * |  * |  *

What to do next

To determine the overall connectivity status in your database high availability cluster, run these commands on each node and compare the results.