title: repmgr - how to make previous Primary to become a standby after failover
body: <p>After performing a fail over, I had the previous Primary down, and the old standby became the Primary, as expected.</p>
  <pre><code>$  repmgr -f /etc/repmgr.conf cluster show --compact
  ID | Name            | Role    | Status    | Upstream | Location | Prio. | TLI
  
  ----+-----------------+---------+-----------+----------+----------+-------+-----
  
  1  | server1         | primary | - failed  |          | default  | 100   | ?
  
  2  | server2         | primary | * running |          | default  | 100   | 2
  
  3  | PG-Node-Witness | witness | * running | server2  | default  | 0     | 1
  </code></pre>
  <p>I would like to make the old Primary join the cluster as a standby.</p>
  <p>I gather the rejoin command should do that.</p>
  <p>However, when I try to rejoin it, to be the new standby, I get this (I run this on the old Primary which is down ):</p>
  <pre><code>repmgr -f /etc/repmgr.conf -d 'host=10.9.7.97 user=repmgr dbname=repmgr' node rejoin 
  </code></pre>
  <p>--where 10.9.7.97 is the ip of node I am running from.</p>
  <p>I get this error:</p>
  <pre><code>$ repmgr -f /etc/repmgr.conf -d 'host=10.97.7.97 user=repmgr dbname=repmgr' node rejoin  --verbose -
  NOTICE: using provided configuration file &quot;/etc/repmgr.conf&quot;
  ERROR: connection to database failed
  DETAIL:
  could not connect to server: Connection refused
          Is the server running on host &quot;10.97.7.97&quot; and accepting
          TCP/IP connections on port 5432?
  </code></pre>
  <p>Of course postgres is down on 10.9.7.97 - the old primary.</p>
  <p>If I start it however, it starts as another primary:</p>
  <pre><code>$  repmgr -f /etc/repmgr.conf cluster show --compact
  
   ID | Name            | Role    | Status    | Upstream | Location | Prio. | TLI
  
  ----+-----------------+---------+-----------+----------+----------+-------+-----
  
   1  | server1         | primary | ! running |          | default  | 100   | 1
  
   2  | server2         | primary | * running |          | default  | 100   | 2
  
   3  | PG-Node-Witness | witness | * running | server2  | default  | 0     | 1
  </code></pre>
  <ul>
  <li>so what is the way to make the old primary the new standby...?</li>
  </ul>
  <p>Thanks</p>