1

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 : 
nbk
8,6996 gold badges15 silver badges27 bronze badges
asked Mar 16, 2021 at 1:40

1 Answer 1

0

Seems you have multiple issues here.

  1. 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.

  2. 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.

answered Jun 1 at 8:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.