View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000826 | Pgpool-II | Bug | public | 2024-01-25 21:31 | 2024-01-25 23:43 |
| Reporter | jerrychenhf | Assigned To | pengbo | ||
| Priority | high | Severity | major | Reproducibility | always |
| Status | feedback | Resolution | open | ||
| Platform | AMD64 | OS | Ubuntu | OS Version | 20.04 |
| Product Version | 4.5.0 | ||||
| Summary | 0000826: When the first node (node with id 0) is not primary, pcp is not starting | ||||
| Description | Use Pgpool-II to proxy 3 Postgres servers running with streaming replication. The 3 Postgres servers are running fine and the first node (example-postgres-1.node.cloudtik) is primary and the other 2 (example-postgres-2.node.cloudtik, example-postgres-3.node.cloudtik) are hot standby. When I configure Pgpool as following for the backend settings: backend_hostname0=example-postgres-3.node.cloudtik backend_port0=5432 backend_weight0=1 backend_hostname1=example-postgres-2.node.cloudtik backend_port1=5432 backend_weight1=1 backend_hostname2=example-postgres-1.node.cloudtik backend_port2=5432 backend_weight2=1 And start Pgpool-II service, the pool service started correctly but pcp service is not. (There is no error log saying anything error. We know the pcp process is not started by checking the pcp port is not listening) If I change the backend configuration to assign the primary node (example-postgres-1.node.cloudtik) the node #0 and this is the only change. The pcp service started and listening. backend_hostname0=example-postgres-1.node.cloudtik backend_port0=5432 backend_weight0=1 backend_hostname1=example-postgres-2.node.cloudtik backend_port1=5432 backend_weight1=1 backend_hostname2=example-postgres-3.node.cloudtik backend_port2=5432 backend_weight2=1 | ||||
| Steps To Reproduce | See above description. | ||||
| Tags | No tags attached. | ||||
|
|
Pgpool PCP process starts after finding the primary node. Below is the Logs: ------------------------------------------------ LOG: find_primary_node: standby node is 0 LOG: find_primary_node: primary node is 1 LOG: create socket files[0]: /tmp/.s.PGSQL.11001 ... LOG: PCP process: 21871 started ------------------------------------------------ If you could see the following log is repeatedly output, it means your pgpool could not find a primary node. PCP process will start after "search_primary_node_timeout = 5min". ------------------------------------------------- LOG: find_primary_node: standby node is ... LOG: find_primary_node: standby node is ... LOG: find_primary_node: standby node is ... ... LOG: failed to find primary node DETAIL: find_primary_node_repeatedly: expired after 300 seconds LOG: create socket files[0]: /tmp/.s.PGSQL.11001 LOG: listen address[0]: localhost LOG: Setting up socket for ::1:11001 LOG: Setting up socket for 127.0.0.1:11001 LOG: PCP process: 22108 started ------------------------------------------------- If you can see the logs above, try to remove the pgpool_status file in the directory which is specified in "logdir" and restart pgpool again. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2024-01-25 21:31 | jerrychenhf | New Issue | |
| 2024-01-25 23:43 | pengbo | Note Added: 0004475 | |
| 2024-01-25 23:43 | pengbo | Assigned To | => pengbo |
| 2024-01-25 23:43 | pengbo | Status | new => feedback |