[pgpool-general: 8283] Re: Problems taking node offline
Jon SCHEWE
jon.schewe at raytheon.com
Sat Jul 2 06:03:51 JST 2022
I've setup a development cluster using pgpool 4.3.2 and postgresql 13. I've upgraded the pg_recovery extension to 1.4
and I'm able to get all backend nodes online using pcp_recovery_node.
Now I'm trying to test taking down a backend node.
template1=# show pool_nodes;
node_id | hostname | port | status | pg_status | lb_weight | role | pg_role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change
---------+--------------------------+------+--------+-----------+-----------+---------+---------+------------+-------------------+-------------------+-------------------+------------------------+---------------------
0 | psql-dev-01.mgmt.bbn.com | 5432 | up | up | 0.333333 | standby | standby | 0 | true | 0 | streaming | sync | 2022-07-01 16:34:16
1 | psql-dev-02.mgmt.bbn.com | 5432 | up | up | 0.333333 | standby | standby | 0 | false | 0 | streaming | potential | 2022-07-01 16:37:19
2 | psql-dev-03.mgmt.bbn.com | 5432 | up | up | 0.333333 | primary | primary | 6 | false | 0 | | | 2022-07-01 12:41:51
(3 rows)
Trying to take down the primary node:
[jschewe-adm at psql-dev-03 ~]$ pcp_detach_node -h psql.mgmt.bbn.com -p 9897 -U pgpool -g -n 2
Password:
ERROR: invalid degenerate backend request, node id : 2 status: [3] is not valid for failover
Why didn't this work?
Trying to take down a standby node:
[jschewe-adm at psql-dev-03 ~]$ pcp_detach_node -h psql.mgmt.bbn.com -p 9897 -U pgpool -g -n 1
pcp_detach_node -- Command Successful
template1=# show pool_nodes;
node_id | hostname | port | status | pg_status | lb_weight | role | pg_role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change
---------+--------------------------+------+--------+-----------+-----------+---------+---------+------------+-------------------+-------------------+-------------------+------------------------+---------------------
0 | psql-dev-01.mgmt.bbn.com | 5432 | up | up | 0.333333 | standby | standby | 0 | false | 0 | streaming | sync | 2022-07-01 16:34:16
1 | psql-dev-02.mgmt.bbn.com | 5432 | up | up | 0.333333 | standby | standby | 0 | false | 0 | streaming | potential | 2022-07-01 16:37:19
2 | psql-dev-03.mgmt.bbn.com | 5432 | up | up | 0.333333 | primary | primary | 6 | true | 0 | | | 2022-07-01 12:41:51
(3 rows)
Node is still up.
Nothing in the pgpool log other than a bunch of messages that say
2022-07-01 16:59:04.966: watchdog pid 311085: LOG: new IPC connection received
Jon Schewe
More information about the pgpool-general
mailing list