[pgpool-general: 6411] Re: Incorrectly reported old primary node id
Pierre Timmermans
ptim007 at yahoo.com
Wed Feb 13 03:32:17 JST 2019
I think you might hit a bug which is solved in 3.7.4, here is the bug report I made at the time. The behavior was like you say : first failover OK, then second not anymore.
[pgpool-general: 6094] Re: pgpool failover from node 1 to node 0: incorrect value for %P in version 3.7.3 ?
|
|
| |
[pgpool-general: 6094] Re: pgpool failover from node 1 to node 0: incorr...
|
|
|
Regards,
Pierre
On Tuesday, February 12, 2019, 6:44:45 PM GMT+1, Andre Piwoni <apiwoni at webmd.net> wrote:
I have cluster of two nodes with failover script which promotes primary node only when ${failed_node_id} = ${old_primary_node_id}After failover from node1 to node2 is successfully executed, second failover attempt from node2 to node1 fails because old primary node is incorrectly reported.Other people seem to have problems with reporting old primary node id https://www.pgpool.net/mantisbt/view.php?id=112I noticed that many failover scripts do not check if ${failed_node_id} = ${old_primary_node_id} before promotion so my question is a follows.Given this flakiness in reporting, is there any reason to perform this test in failover script before promotion? I run PgPool-II 3.7.3.
Here's relevant info:
systemctl start pgpool
Feb 12 09:13:01 pg-hdp-node1 pgpool[25308]: [7-1] 2019-02-12 09:13:01: pid 25308: LOG: find_primary_node: primary node id is 1
postgres=> show pool_nodes; node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay ---------+----------------------------+------+--------+-----------+---------+------------+-------------------+------------------- 0 | pg-hdp-node1.kitchen.local | 5432 | up | 0.500000 | standby | 0 | false | 0 1 | pg-hdp-node2.kitchen.local | 5432 | up | 0.500000 | primary | 0 | true | 0
pg-hdp-node2.kitchen.local> systemctl stop postgresql-10
Feb 12 09:15:06 pg-hdp-node1 pgpool[25308]: [9-1] 2019-02-12 09:15:06: pid 25308: LOG: Pgpool-II parent process has received failover requestFeb 12 09:15:06 pg-hdp-node1 pgpool[25308]: [10-1] 2019-02-12 09:15:06: pid 25308: LOG: starting degeneration. shutdown host pg-hdp-node2.kitchen.local(5432)
[root at pg-hdp-node1 pgpool]# cat failover.log failed_node_id 1failed_node_host pg-hdp-node2.kitchen.localfailed_node_port 5432failed_node_pgdata /var/lib/pgsql/10/dataold_primary_node_id 0old_master_node_id 0new_master_node_id 0new_master_node_host pg-hdp-node1.kitchen.localnew_master_node_port 5432new_master_node_pgdata /var/lib/pgsql/10/data
Old primary node id should 1.
Andre Piwoni
_______________________________________________
pgpool-general mailing list
pgpool-general at pgpool.net
http://www.pgpool.net/mailman/listinfo/pgpool-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20190212/7589d6ff/attachment.htm>
More information about the pgpool-general
mailing list