<div dir="ltr"><div dir="ltr">I have already put that check in place.<div><br></div><div>Thank you for confirming.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 23, 2019 at 11:56 PM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sorry, I was wrong. A follow_master_command will be executed against<br>
the down node as well. So you need to check whether target PostgreSQL<br>
node is running in the follow_master_commdn. If it&#39;s not, you can skip<br>
the node.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
&gt; I have added pg_ctl status check to ensure no action is taken when node is<br>
&gt; down but I&#39;ll check 3.7.8 version.<br>
&gt; <br>
&gt; Here&#39;s the Pgpool log from the time node2 is shutdown to time node1(already<br>
&gt; dead old primary) received follow master command.<br>
&gt; Sorry for double date logging. I&#39;m also including self-explanatory<br>
&gt; failover.log that I my failover and follow_master scripts generated.<br>
&gt; <br>
&gt; Arguments passed to scripts for your reference.<br>
&gt; failover.sh %d %h %p %D %M %P %m %H %r %R<br>
&gt; follow_master.sh %d %h %p %D %M %P %m %H %r %R<br>
&gt; <br>
&gt; Pool status before shutdown of node 2:<br>
&gt; postgres=&gt; show pool_nodes;<br>
&gt;  node_id |          hostname          | port | status | lb_weight |  role<br>
&gt;  | select_cnt | load_balance_node | replication_delay<br>
&gt; ---------+----------------------------+------+--------+-----------+---------+------------+-------------------+-------------------<br>
&gt;  0       | pg-hdp-node1.kitchen.local | 5432 | down   | 0.333333  | standby<br>
&gt; | 0          | false             | 0<br>
&gt;  1       | pg-hdp-node2.kitchen.local | 5432 | up     | 0.333333  | primary<br>
&gt; | 0          | false             | 0<br>
&gt;  2       | pg-hdp-node3.kitchen.local | 5432 | up     | 0.333333  | standby<br>
&gt; | 0          | true              | 0<br>
&gt; (3 rows)<br>
&gt; <br>
&gt; Pgpool log<br>
&gt; Feb 22 10:43:27 pg-hdp-node3 pgpool[12437]: [126-1] 2019-02-22 10:43:27:<br>
&gt; pid 12437: LOG:  failed to connect to PostgreSQL server on<br>
&gt; &quot;pg-hdp-node2.kitchen.local:5432&quot;, getsockopt() detected error &quot;Connection<br>
&gt; refused&quot;<br>
&gt; Feb 22 10:43:27 pg-hdp-node3 pgpool[12437]: [127-1] 2019-02-22 10:43:27:<br>
&gt; pid 12437: ERROR:  failed to make persistent db connection<br>
&gt; Feb 22 10:43:27 pg-hdp-node3 pgpool[12437]: [127-2] 2019-02-22 10:43:27:<br>
&gt; pid 12437: DETAIL:  connection to host:&quot;pg-hdp-node2.kitchen.local:5432&quot;<br>
&gt; failed<br>
&gt; Feb 22 10:43:37 pg-hdp-node3 pgpool[12437]: [128-1] 2019-02-22 10:43:37:<br>
&gt; pid 12437: ERROR:  Failed to check replication time lag<br>
&gt; Feb 22 10:43:37 pg-hdp-node3 pgpool[12437]: [128-2] 2019-02-22 10:43:37:<br>
&gt; pid 12437: DETAIL:  No persistent db connection for the node 1<br>
&gt; Feb 22 10:43:37 pg-hdp-node3 pgpool[12437]: [128-3] 2019-02-22 10:43:37:<br>
&gt; pid 12437: HINT:  check sr_check_user and sr_check_password<br>
&gt; Feb 22 10:43:37 pg-hdp-node3 pgpool[12437]: [128-4] 2019-02-22 10:43:37:<br>
&gt; pid 12437: CONTEXT:  while checking replication time lag<br>
&gt; Feb 22 10:43:37 pg-hdp-node3 pgpool[12437]: [129-1] 2019-02-22 10:43:37:<br>
&gt; pid 12437: LOG:  failed to connect to PostgreSQL server on<br>
&gt; &quot;pg-hdp-node2.kitchen.local:5432&quot;, getsockopt() detected error &quot;Connection<br>
&gt; refused&quot;<br>
&gt; Feb 22 10:43:37 pg-hdp-node3 pgpool[12437]: [130-1] 2019-02-22 10:43:37:<br>
&gt; pid 12437: ERROR:  failed to make persistent db connection<br>
&gt; Feb 22 10:43:37 pg-hdp-node3 pgpool[12437]: [130-2] 2019-02-22 10:43:37:<br>
&gt; pid 12437: DETAIL:  connection to host:&quot;pg-hdp-node2.kitchen.local:5432&quot;<br>
&gt; failed<br>
&gt; Feb 22 10:43:45 pg-hdp-node3 pgpool[7786]: [6-1] 2019-02-22 10:43:45: pid<br>
&gt; 7786: LOG:  failed to connect to PostgreSQL server on<br>
&gt; &quot;pg-hdp-node2.kitchen.local:5432&quot;, getsockopt() detected error &quot;Connection<br>
&gt; refused&quot;<br>
&gt; Feb 22 10:43:45 pg-hdp-node3 pgpool[7786]: [7-1] 2019-02-22 10:43:45: pid<br>
&gt; 7786: ERROR:  failed to make persistent db connection<br>
&gt; Feb 22 10:43:45 pg-hdp-node3 pgpool[7786]: [7-2] 2019-02-22 10:43:45: pid<br>
&gt; 7786: DETAIL:  connection to host:&quot;pg-hdp-node2.kitchen.local:5432&quot; failed<br>
&gt; Feb 22 10:43:45 pg-hdp-node3 pgpool[7786]: [8-1] 2019-02-22 10:43:45: pid<br>
&gt; 7786: LOG:  health check retrying on DB node: 1 (round:1)<br>
&gt; Feb 22 10:43:47 pg-hdp-node3 pgpool[12437]: [131-1] 2019-02-22 10:43:47:<br>
&gt; pid 12437: ERROR:  Failed to check replication time lag<br>
&gt; Feb 22 10:43:47 pg-hdp-node3 pgpool[12437]: [131-2] 2019-02-22 10:43:47:<br>
&gt; pid 12437: DETAIL:  No persistent db connection for the node 1<br>
&gt; Feb 22 10:43:47 pg-hdp-node3 pgpool[12437]: [131-3] 2019-02-22 10:43:47:<br>
&gt; pid 12437: HINT:  check sr_check_user and sr_check_password<br>
&gt; Feb 22 10:43:47 pg-hdp-node3 pgpool[12437]: [131-4] 2019-02-22 10:43:47:<br>
&gt; pid 12437: CONTEXT:  while checking replication time lag<br>
&gt; Feb 22 10:43:47 pg-hdp-node3 pgpool[12437]: [132-1] 2019-02-22 10:43:47:<br>
&gt; pid 12437: LOG:  failed to connect to PostgreSQL server on<br>
&gt; &quot;pg-hdp-node2.kitchen.local:5432&quot;, getsockopt() detected error &quot;Connection<br>
&gt; refused&quot;<br>
&gt; Feb 22 10:43:47 pg-hdp-node3 pgpool[12437]: [133-1] 2019-02-22 10:43:47:<br>
&gt; pid 12437: ERROR:  failed to make persistent db connection<br>
&gt; Feb 22 10:43:47 pg-hdp-node3 pgpool[12437]: [133-2] 2019-02-22 10:43:47:<br>
&gt; pid 12437: DETAIL:  connection to host:&quot;pg-hdp-node2.kitchen.local:5432&quot;<br>
&gt; failed<br>
&gt; Feb 22 10:43:48 pg-hdp-node3 pgpool[7786]: [9-1] 2019-02-22 10:43:48: pid<br>
&gt; 7786: LOG:  failed to connect to PostgreSQL server on<br>
&gt; &quot;pg-hdp-node2.kitchen.local:5432&quot;, getsockopt() detected error &quot;Connection<br>
&gt; refused&quot;<br>
&gt; Feb 22 10:43:48 pg-hdp-node3 pgpool[7786]: [10-1] 2019-02-22 10:43:48: pid<br>
&gt; 7786: ERROR:  failed to make persistent db connection<br>
&gt; Feb 22 10:43:48 pg-hdp-node3 pgpool[7786]: [10-2] 2019-02-22 10:43:48: pid<br>
&gt; 7786: DETAIL:  connection to host:&quot;pg-hdp-node2.kitchen.local:5432&quot; failed<br>
&gt; Feb 22 10:43:48 pg-hdp-node3 pgpool[7786]: [11-1] 2019-02-22 10:43:48: pid<br>
&gt; 7786: LOG:  health check retrying on DB node: 1 (round:2)<br>
&gt; Feb 22 10:43:51 pg-hdp-node3 pgpool[7786]: [12-1] 2019-02-22 10:43:51: pid<br>
&gt; 7786: LOG:  failed to connect to PostgreSQL server on<br>
&gt; &quot;pg-hdp-node2.kitchen.local:5432&quot;, getsockopt() detected error &quot;Connection<br>
&gt; refused&quot;<br>
&gt; Feb 22 10:43:51 pg-hdp-node3 pgpool[7786]: [13-1] 2019-02-22 10:43:51: pid<br>
&gt; 7786: ERROR:  failed to make persistent db connection<br>
&gt; Feb 22 10:43:51 pg-hdp-node3 pgpool[7786]: [13-2] 2019-02-22 10:43:51: pid<br>
&gt; 7786: DETAIL:  connection to host:&quot;pg-hdp-node2.kitchen.local:5432&quot; failed<br>
&gt; Feb 22 10:43:51 pg-hdp-node3 pgpool[7786]: [14-1] 2019-02-22 10:43:51: pid<br>
&gt; 7786: LOG:  health check retrying on DB node: 1 (round:3)<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7786]: [15-1] 2019-02-22 10:43:54: pid<br>
&gt; 7786: LOG:  failed to connect to PostgreSQL server on<br>
&gt; &quot;pg-hdp-node2.kitchen.local:5432&quot;, getsockopt() detected error &quot;Connection<br>
&gt; refused&quot;<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7786]: [16-1] 2019-02-22 10:43:54: pid<br>
&gt; 7786: ERROR:  failed to make persistent db connection<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7786]: [16-2] 2019-02-22 10:43:54: pid<br>
&gt; 7786: DETAIL:  connection to host:&quot;pg-hdp-node2.kitchen.local:5432&quot; failed<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7786]: [17-1] 2019-02-22 10:43:54: pid<br>
&gt; 7786: LOG:  health check failed on node 1 (timeout:0)<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7786]: [18-1] 2019-02-22 10:43:54: pid<br>
&gt; 7786: LOG:  received degenerate backend request for node_id: 1 from pid<br>
&gt; [7786]<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7746]: [253-1] 2019-02-22 10:43:54: pid<br>
&gt; 7746: LOG:  Pgpool-II parent process has received failover request<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7746]: [254-1] 2019-02-22 10:43:54: pid<br>
&gt; 7746: LOG:  starting degeneration. shutdown host<br>
&gt; pg-hdp-node2.kitchen.local(5432)<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7746]: [255-1] 2019-02-22 10:43:54: pid<br>
&gt; 7746: LOG:  Restart all children<br>
&gt; Feb 22 10:43:54 pg-hdp-node3 pgpool[7746]: [256-1] 2019-02-22 10:43:54: pid<br>
&gt; 7746: LOG:  execute command: /etc/pgpool-II/failover.sh 1<br>
&gt; pg-hdp-node2.kitchen.local 5432 /var/lib/pgsql/10/data 1 1 2<br>
&gt; pg-hdp-node3.kitchen.local 5432 /var/lib/pgsql/10/data<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [257-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  find_primary_node_repeatedly: waiting for finding a primary node<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [258-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  find_primary_node: checking backend no 0<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [259-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  find_primary_node: checking backend no 1<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [260-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  find_primary_node: checking backend no 2<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [261-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  find_primary_node: primary node id is 2<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [262-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  starting follow degeneration. shutdown host<br>
&gt; pg-hdp-node1.kitchen.local(5432)<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [263-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  starting follow degeneration. shutdown host<br>
&gt; pg-hdp-node2.kitchen.local(5432)<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [264-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  failover: 2 follow backends have been degenerated<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [265-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  failover: set new primary node: 2<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [266-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  failover: set new master node: 2<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[7746]: [267-1] 2019-02-22 10:43:55: pid<br>
&gt; 7746: LOG:  failover done. shutdown host pg-hdp-node2.kitchen.local(5432)<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12437]: [134-1] 2019-02-22 10:43:55:<br>
&gt; pid 12437: ERROR:  Failed to check replication time lag<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12437]: [134-2] 2019-02-22 10:43:55:<br>
&gt; pid 12437: DETAIL:  No persistent db connection for the node 1<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12437]: [134-3] 2019-02-22 10:43:55:<br>
&gt; pid 12437: HINT:  check sr_check_user and sr_check_password<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12437]: [134-4] 2019-02-22 10:43:55:<br>
&gt; pid 12437: CONTEXT:  while checking replication time lag<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12437]: [135-1] 2019-02-22 10:43:55:<br>
&gt; pid 12437: LOG:  worker process received restart request<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12774]: [267-1] 2019-02-22 10:43:55:<br>
&gt; pid 12774: LOG:  failback event detected<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12774]: [267-2] 2019-02-22 10:43:55:<br>
&gt; pid 12774: DETAIL:  restarting myself<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12742]: [265-1] 2019-02-22 10:43:55:<br>
&gt; pid 12742: LOG:  start triggering follow command.<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12742]: [266-1] 2019-02-22 10:43:55:<br>
&gt; pid 12742: LOG:  execute command: /etc/pgpool-II/follow_master.sh 0<br>
&gt; pg-hdp-node1.kitchen.local 5432 /var/lib/pgsql/10/data 1 1 2<br>
&gt; pg-hdp-node3.kitchen.local 5432 /var/lib/pgsql/10/data<br>
&gt; Feb 22 10:43:55 pg-hdp-node3 pgpool[12742]: [267-1] 2019-02-22 10:43:55:<br>
&gt; pid 12742: LOG:  execute command: /etc/pgpool-II/follow_master.sh 1<br>
&gt; pg-hdp-node2.kitchen.local 5432 /var/lib/pgsql/10/data 1 1 2<br>
&gt; pg-hdp-node3.kitchen.local 5432 /var/lib/pgsql/10/data<br>
&gt; Feb 22 10:43:56 pg-hdp-node3 pgpool[12436]: [60-1] 2019-02-22 10:43:56: pid<br>
&gt; 12436: LOG:  restart request received in pcp child process<br>
&gt; Feb 22 10:43:56 pg-hdp-node3 pgpool[7746]: [268-1] 2019-02-22 10:43:56: pid<br>
&gt; 7746: LOG:  PCP child 12436 exits with status 0 in failover()<br>
&gt; <br>
&gt; Pgpool self-explanatory failover.log<br>
&gt; <br>
&gt; 2019-02-22 10:43:54.893 PST Executing failover script ...<br>
&gt; 2019-02-22 10:43:54.895 PST Script arguments:<br>
&gt; failed_node_id           1<br>
&gt; failed_node_host         pg-hdp-node2.kitchen.local<br>
&gt; failed_node_port         5432<br>
&gt; failed_node_pgdata       /var/lib/pgsql/10/data<br>
&gt; old_primary_node_id      1<br>
&gt; old_master_node_id       1<br>
&gt; new_master_node_id       2<br>
&gt; new_master_node_host     pg-hdp-node3.kitchen.local<br>
&gt; new_master_node_port     5432<br>
&gt; new_master_node_pgdata   /var/lib/pgsql/10/data<br>
&gt; 2019-02-22 10:43:54.897 PST Primary node running on<br>
&gt; pg-hdp-node2.kitchen.local host is unresponsive or have died<br>
&gt; 2019-02-22 10:43:54.898 PST Attempting to stop primary node running on<br>
&gt; pg-hdp-node2.kitchen.local host before promoting slave as the new primary<br>
&gt; 2019-02-22 10:43:54.899 PST ssh -o StrictHostKeyChecking=no -i<br>
&gt; /var/lib/pgsql/.ssh/id_rsa postgres@pg-hdp-node2.kitchen.local -T<br>
&gt; /usr/pgsql-10/bin/pg_ctl -D /var/lib/pgsql/10/data stop -m fast<br>
&gt; 2019-02-22 10:43:55.151 PST Promoting pg-hdp-node3.kitchen.local host as<br>
&gt; the new primary<br>
&gt; 2019-02-22 10:43:55.153 PST ssh -o StrictHostKeyChecking=no -i<br>
&gt; /var/lib/pgsql/.ssh/id_rsa postgres@pg-hdp-node3.kitchen.local -T<br>
&gt; /usr/pgsql-10/bin/pg_ctl -D /var/lib/pgsql/10/data promote<br>
&gt; waiting for server to promote.... done<br>
&gt; server promoted<br>
&gt; 2019-02-22 10:43:55.532 PST Completed executing failover<br>
&gt; <br>
&gt; 2019-02-22 10:43:55.564 PST Executing follow master script ...<br>
&gt; 2019-02-22 10:43:55.566 PST Script arguments<br>
&gt; detached_node_id         0<br>
&gt; detached_node_host       pg-hdp-node1.kitchen.local<br>
&gt; detached_node_port       5432<br>
&gt; detached_node_pgdata     /var/lib/pgsql/10/data<br>
&gt; old_primary_node_id      1<br>
&gt; old_master_node_id       1<br>
&gt; new_master_node_id       2<br>
&gt; new_master_node_host     pg-hdp-node3.kitchen.local<br>
&gt; new_master_node_port     5432<br>
&gt; new_master_node_pgdata   /var/lib/pgsql/10/data<br>
&gt; 2019-02-22 10:43:55.567 PST Checking if server is running on<br>
&gt; pg-hdp-node1.kitchen.local host<br>
&gt; 2019-02-22 10:43:55.569 PST ssh -o StrictHostKeyChecking=no -i<br>
&gt; /var/lib/pgsql/.ssh/id_rsa postgres@pg-hdp-node1.kitchen.local -T<br>
&gt; /usr/pgsql-10/bin/pg_ctl -D /var/lib/pgsql/10/data status<br>
&gt; <br>
&gt; <br>
&gt; pg_ctl: no server running<br>
&gt; 2019-02-22 10:43:55.823 PST Node on pg-hdp-node1.kitchen.local host is not<br>
&gt; running. It could be old slave or primary that needs to be recovered.<br>
&gt; 2019-02-22 10:43:55.824 PST Completed executing follow master script<br>
&gt; <br>
&gt; 2019-02-22 10:43:55.829 PST Executing follow master script ...<br>
&gt; 2019-02-22 10:43:55.830 PST Script arguments<br>
&gt; detached_node_id         1<br>
&gt; detached_node_host       pg-hdp-node2.kitchen.local<br>
&gt; detached_node_port       5432<br>
&gt; detached_node_pgdata     /var/lib/pgsql/10/data<br>
&gt; old_primary_node_id      1<br>
&gt; old_master_node_id       1<br>
&gt; new_master_node_id       2<br>
&gt; new_master_node_host     pg-hdp-node3.kitchen.local<br>
&gt; new_master_node_port     5432<br>
&gt; new_master_node_pgdata   /var/lib/pgsql/10/data<br>
&gt; 2019-02-22 10:43:55.831 PST Detached node on pg-hdp-node2.kitchen.local<br>
&gt; host is the the old primary node<br>
&gt; 2019-02-22 10:43:55.833 PST Slave can be created from old primary node by<br>
&gt; deleting PG_DATA directory under /var/lib/pgsql/10/data on<br>
&gt; pg-hdp-node2.kitchen.local host and re-running Chef client<br>
&gt; 2019-02-22 10:43:55.834 PST Slave can be recovered from old primary node by<br>
&gt; running /usr/pgsql-10/bin/pg_rewind -D /var/lib/pgsql/10/data<br>
&gt; --source-server=&quot;port=5432 host=pg-hdp-node3.kitchen.local&quot; command on<br>
&gt; pg-hdp-node2.kitchen.local host as postgres user<br>
&gt; 2019-02-22 10:43:55.835 PST After successful pg_rewind run cp<br>
&gt; /var/lib/pgsql/10/data/recovery.done /var/lib/pgsql/10/data/recovery.conf,<br>
&gt; ensure host connection string points to pg-hdp-node3.kitchen.local, start<br>
&gt; PostgreSQL and attach it to pgpool<br>
&gt; 2019-02-22 10:43:55.836 PST Completed executing follow master script<br>
&gt; <br>
&gt; On Thu, Feb 21, 2019 at 4:47 PM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt; wrote:<br>
&gt; <br>
&gt;&gt; &gt; Is this correct behavior?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; In 3-node setup, node1(primary) is shutdown, failover is executed and<br>
&gt;&gt; node2<br>
&gt;&gt; &gt; becomes new primary and node3 follows new primary on node2.<br>
&gt;&gt; &gt; Now, node2(new primary) is shutdown, failover is executed and node3<br>
&gt;&gt; becomes<br>
&gt;&gt; &gt; new primary but fallow_master_command is executed on node1 even though it<br>
&gt;&gt; &gt; is reported as down.<br>
&gt;&gt;<br>
&gt;&gt; No. follow master command should not be executed on an already-down<br>
&gt;&gt; node (in this case node1).<br>
&gt;&gt;<br>
&gt;&gt; &gt; It happens that my script repoints node1 and restarts it which breaks<br>
&gt;&gt; hell<br>
&gt;&gt; &gt; because node1 was never recovered after being shutdown.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;m on PgPool 3.7.4.<br>
&gt;&gt;<br>
&gt;&gt; Can you share the log from when node2 was shutdown to when node1 was<br>
&gt;&gt; recovered by your follow master command?<br>
&gt;&gt;<br>
&gt;&gt; In the mean time 3.7.4 is not the latest one. Can you try with the<br>
&gt;&gt; latest one? (3.7.8).<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt;<br>
&gt; <br>
&gt; <br>
&gt; -- <br>
&gt; <br>
&gt; *Andre Piwoni*<br><br></blockquote></div></div>