两行代码:

pgpool stop
pgpool -C -D

执行前:

highgo=# show pool_nodes;
 node_id | hostname | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay 
---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------
 0       | db1      | 5866 | up     | 0.500000  | standby | 0          | true              | 0
 1       | db2      | 5866 | down   | 0.500000  | standby | 0          | false             | 0
(2 rows)
执行后:

highgo=# show pool_nodes;
 node_id | hostname | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay 
---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------
 0       | db1      | 5866 | up     | 0.500000  | standby | 0          | false             | 0
 1       | db2      | 5866 | up     | 0.500000  | primary | 0          | true              | 0
(2 rows) 


原文链接:https://blog.csdn.net/lk_db/article/details/77943776


欢迎留言