View Issue Details

IDProjectCategoryView StatusLast Update
0000705Pgpool-IIEnhancementpublic2021-06-08 19:14
Reportert3mp30r3k Assigned Topengbo  
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionopen 
Product Version4.2.2 
Summary0000705: last primary DB on PGPool
Descriptioni have 2 server (server1 and server2)
when all server was down/shutdown..
how to check the last primary DB on both server ?
TagsNo tags attached.

Activities

pengbo

2021-04-21 14:16

developer   ~0003821

If all server goes down, you can not connect to pgpool using psql.
In such cases, you can use pcp command to check the status of backend nodes.

https://www.pgpool.net/docs/latest/en/html/pcp-node-info.html

$ pcp_node_info -h 127.0.0.1 -p 11001 -U pengbo -n 0
Password:
/tmp 11002 3 0.333333 down primary 0 2021-04-21 14:11:57

t3mp30r3k

2021-04-22 11:20

reporter   ~0003822

pcp command used when pgsql is UP.
what about if, when all DB is down..?
how to check who is the latest primary DB ? before all service pgpool and pgsql need to start manually ..

pengbo

2021-04-27 23:49

developer   ~0003825

> pcp command used when pgsql is UP.
> what about if, when all DB is down..?

You can execute pcp command even if all DB goes down.
However, If pgpool goes down, you can't use pcp command.

> how to check who is the latest primary DB ? before all service pgpool and pgsql need to start manually ..

If pgpool is running, you can execute pcp_node_info.
If primary is showed in the result, the node is the latest primary DB.

----------
$ pcp_node_info -h 127.0.0.1 -p 11001 -U pengbo -n 0
Password:
/tmp 11002 3 0.333333 down primary 0 2021-04-21 14:11:57
----------

If both of pgpool and DB go down, you could check if the recovery.conf or standby.signal exists in the data directory.
However, If failover occurs just before DB go down, you may need to check PostgreSQL logs to find the latest primary.

pengbo

2021-06-08 13:53

developer   ~0003869

Have you resolved this issue?
May I close this issue?

t3mp30r3k

2021-06-08 19:08

reporter   ~0003873

Yes..

Issue History

Date Modified Username Field Change
2021-04-21 11:58 t3mp30r3k New Issue
2021-04-21 14:13 pengbo Assigned To => pengbo
2021-04-21 14:13 pengbo Status new => assigned
2021-04-21 14:16 pengbo Note Added: 0003821
2021-04-21 14:17 pengbo Status assigned => feedback
2021-04-22 11:20 t3mp30r3k Note Added: 0003822
2021-04-22 11:20 t3mp30r3k Status feedback => assigned
2021-04-27 23:49 pengbo Note Added: 0003825
2021-04-27 23:50 pengbo Status assigned => feedback
2021-06-08 13:53 pengbo Note Added: 0003869
2021-06-08 19:08 t3mp30r3k Note Added: 0003873
2021-06-08 19:08 t3mp30r3k Status feedback => assigned
2021-06-08 19:14 pengbo Status assigned => closed