I've setup a 2+2 pgpool and postgresql cluster. two pgpool nodes in active/standby configuration and a streaming replication between databases All seemed work fine until after some failover and online recovery tests took place. Suddenly I no longer able to see the "streaming" status from either "show pool_nodes" or "pcp_node_info commands. all users have the pg_monitor role granted. I'm unable to understand why I was able to see the "streaming" ( and async) repliction status , but not any more .
Could someone help me to understand why?
postgres=# show pool_nodes;
postgres=# show pool_nodes;
node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change
---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------------+---------------------
0 | xxxxxxx | 5432 | up | 0.500000 | primary | 0 | false | 0 | | | 2021年03月16日 01:37:19
1 | yyyyyy | 5432 | up | 0.500000 | standby | 0 | true | 0 | | | 2021年03月16日 01:37:19
(2 rows)
or from the pcp_node_info command
[postgres@xxxxxxx ~]$ pcp_node_info --verbose -h localhost 0
Password:
Hostname : xxxxxxx
Port : 5432
Status : 3
Weight : 0.500000
Status Name : down
Role : standby
Replication Delay : 0
Replication State : <<<=== it is empty
Replication Sync State : <<<=== it is empty
Last Status Change : 2021年03月16日 00:02:59
[postgres@yyyyyyyy ~]$ pcp_node_info --verbose -h localhost 1
Password:
Hostname : yyyyyyyy
Port : 5432
Status : 1
Weight : 0.500000
Status Name : waiting
Role : primary
Replication Delay : 0
Replication State :
Replication Sync State :
1 Answer 1
Seems you have multiple issues here.
Make sure that sr check user is someone who is superuser, same for health check user. This is because, the status and pg_status columns are not matching. I solve this by setting sr and health check users and frequency.
About the blank state of streaming replication, set application_name parameter in primary_conninfo in standby and also keep the same application name in pgpool.conf for that backend node followed by reload.