I have 3 Postgresql DB nodes (node0, node1, node2, version 9.4) and 1 pgpool node (version 3.7)
Step 1:
1.1) node0 is primary, node1 and node2 are standby.
1.2) "show pool_nodes" and "select * from pg_stat_replication" works as expected.
1.3) "insert" and "select" work as expected.
Step 2:
2.1) I manually stopped postgresql service in node0.
2.2) PGPool runs failover script and node1 becomes primary/node2 becomes standby.
2.3) "Show pool_nodes" shows that node 0 is down and "select * from pg_stat_replication" only shows one stand-by node which is node2. they are correct.
2.4) "insert" and "select" work as expected.
Step 3:
3.1) I manually start node0 as standby to node1.
3.2) "select * from pg_stat_replication" shows that both node0 and node2 are stand-by, which work as expected.
3.3) "show pool_nodes" shows node0 is still "down", which is expected.
3.4) "pcp_attach_node -n 0", which brings back node0. "show pool_nodes" shows node0 is in "up" status now, which is expected.
3.5) However, "insert" will be failed with message "ERROR: cannot execute INSERT in a read-only transaction".
3.6) "select * from pg_stat_replication" shows 0 rows, which means two stand-by nodes disappeared.
3.7) obviously, all "insert" and "select" goes to node0, not node1.
PGPool is running in master-slave streaming mode.
so, what did I miss in step 3.4 to bring back failed node?