View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000690 | Pgpool-II | General | public | 2021-02-14 19:39 | 2021-11-04 10:25 |
| Reporter | thesn@hotmail.com | Assigned To | pengbo | ||
| Priority | urgent | Severity | major | Reproducibility | N/A |
| Status | closed | Resolution | open | ||
| Product Version | 4.1.5 | ||||
| Summary | 0000690: standby still refer to oldprimary after oldprimary down | ||||
| Description | Hi, I have setup 3-node postgres (p0 - primary, p1 - standby, p2 - standby) and 3-node pgpool (n0 - master, n1 - slave, n2 - slave). when i simulate p0 down, p1 become primary and p2 still standby. but p2 is still refering to p0 as the primary (source of replication). I conclude this by inserting 1 record in a table in p1, but the new record is not replicated to p2. how to make p2 automatically refer p1 as its primary and start wal receiving immediately? anything i should be aware of (in terms of configuration, etc)? Thank you. | ||||
| Tags | No tags attached. | ||||
|
|
Have you specified "follow_master_command" parameter? Here is an example: https://www.pgpool.net/docs/41/en/html/example-cluster.html |
|
|
yup, i mis-specified it. i use follow_primary_command instead of follow_master_command. and now yes the follow_primary.sh is triggered, but i have another issues: 1. the line that call pg_rewind gave me error, because it uses "postgres' user without password, then i changed it into: su - postgres -c '${PGHOME}/bin/pg_rewind -D ${NODE_PGDATA} --source-server=\"user=postgres password=myplainpassword host=${NEW_PRIMARY_NODE_HOST} port=${NEW_PRIMARY_NODE_PORT}\"' not sure it will work, i will try it tonight. 2. the line that call pcp_attach_node also gave me error related to password. I am confused on password configuration in pcp.conf, pool_passwd, and .pcppass. Why there need to be in several places? I am sorry if this password thing should not be discussed in this thread. Thank you. |
|
|
Have you resolved this issue? If you have resolved this issue, I am going to close this one? |
|
|
Hi, I have the same problem, but some diffrent case. I use pgpool 4.2.2 version, and I have set follow_primary_command (there is not follow_master_command in 4.2.2 version) . case1: 3 nodes(id : 0 master, 1 slave, 2 slave), when node 0 is master and simulate node 0 down, the node 1 become primary and node 2 still standby. case2: 3 nodes(id : 1 master, 0 slave, 2 slave) when node 1 is master and simulate node 1 down, the node 0 become primary and node 2 is triggered to follow new primary node 0. case3: 3 nodes(id : 2 master, 0 slave, 1 slave) when node 2 is master and simulate node 2 down, the node 0 become primary and node 1 is triggered to follow new primary node 0. So only in this case ( node 0 is primary ), the follow_primary_command is not triggered. I don't know what is the problem? please help me , Thank you. |
|
|
Let me just add to that: if I turn on the autofailback,case1 will happen: 3 nodes(id : 0 master, 1 slave, 2 slave), when node 0 is master and simulate node 0 down, the node 1 become primary and node 2 still standby. but if I turn off the autofailback, then node 2 will follow the new primary node1. only if backend_status==CON_DOWN, node will be triggered to follow primary. It seems that turn on autofailback ,the pgpool will receive failback message ,and change backend_status to CON_CONNECT_WAIT; this lead to node 2 not to be triggered. |
|
|
my problem is resolved in pgpool 4.2.5 version. |
|
|
Thank you for your report. I am going to close this issue. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2021-02-14 19:39 | thesn@hotmail.com | New Issue | |
| 2021-02-15 09:54 | pengbo | Note Added: 0003736 | |
| 2021-02-15 09:55 | pengbo | Assigned To | => pengbo |
| 2021-02-15 09:55 | pengbo | Status | new => feedback |
| 2021-02-15 21:10 | thesn@hotmail.com | Note Added: 0003739 | |
| 2021-02-15 21:10 | thesn@hotmail.com | Status | feedback => assigned |
| 2021-06-15 16:13 | administrator | Note Added: 0003878 | |
| 2021-06-15 16:13 | administrator | Status | assigned => feedback |
| 2021-06-22 16:15 | sanguoasd | Note Added: 0003882 | |
| 2021-06-22 21:07 | sanguoasd | Note Added: 0003883 | |
| 2021-11-03 18:47 | sanguoasd | Note Added: 0003950 | |
| 2021-11-04 10:24 | pengbo | Note Added: 0003951 | |
| 2021-11-04 10:25 | pengbo | Status | feedback => closed |