View Issue Details

IDProjectCategoryView StatusLast Update
0000234Pgpool-IIBugpublic2017-08-29 09:36
Reportersvorstenbosch Assigned ToMuhammad Usama  
PriorityurgentSeverityblockReproducibilityalways
Status closedResolutionopen 
Product Version3.5.3 
Summary0000234: pgpool fails to run failover script if the sever running primary pgpool node and postgresql server dies
DescriptionWhen I kill both the master postgresql server and the primary pgpool node (using watchdog) at the same time failover fails. I can see that the standby pgpool sees that the master postgresql server has stopped and is forwarding its failover command to the primary pgpool node. This does not work as it was on the same server. After some retries it stops trying and then promotes itself to master (this behaviour can be seen in the log attachement. Leaving my environment masterless.

When the primary pgpool node resides on the slave postgres server failover works normally when the master server dies.

I have attached the templated version of my pgpool.conf and a log trace of when it actually happens.
Steps To ReproduceSet up basic 2 server cluster (1 postgresql and pgpool on each) using basic conf with watchdog. Make sure the primary pgpool node resides on the master postgresql server. Use killall -9 -u <user for both pgsql and pgpool> to eliminate all postgresql and pgpool processes at once. Watch the mayhem.
Additional InformationTurning of watchdog resolves this problem. But in return my environment is broken when both pgpools are alive and I put down the master postgresql as both pgpools fire of the failover and recovery steps (breaking my postgresql).
TagsNo tags attached.

Activities

svorstenbosch

2016-08-23 00:51

reporter  

pgpool_failover_failed.txt (28,783 bytes)   
pgpool_failover_failed.txt (28,783 bytes)   

svorstenbosch

2016-08-23 01:11

reporter  

pgpool.conf.j2 (30,972 bytes)

z0rb1n0

2016-08-23 19:40

reporter   ~0001019

By the looks of it this is a duplicate of http://www.pgpool.net/mantisbt/view.php?id=227 , which is already assigned.

Muhammad Usama

2016-09-27 23:32

developer  

failover_standby_fix.diff (45,682 bytes)   
failover_standby_fix.diff (45,682 bytes)   

Muhammad Usama

2016-09-27 23:35

developer   ~0001091

Hi

Can you please try the attached a patch (failover_standby_fix.diff) if it solves the issue.

Note that you need to apply the patch on the current head of master branch and if it fixes the problem I will also back port it to pgpool-II 3.5 branch.

Thanks

Issue History

Date Modified Username Field Change
2016-08-23 00:51 svorstenbosch New Issue
2016-08-23 00:51 svorstenbosch File Added: pgpool_failover_failed.txt
2016-08-23 01:11 svorstenbosch File Added: pgpool.conf.j2
2016-08-23 19:40 z0rb1n0 Note Added: 0001019
2016-09-06 09:16 t-ishii Assigned To => Muhammad Usama
2016-09-06 09:16 t-ishii Status new => assigned
2016-09-27 23:32 Muhammad Usama File Added: failover_standby_fix.diff
2016-09-27 23:35 Muhammad Usama Status assigned => feedback
2016-09-27 23:35 Muhammad Usama Note Added: 0001091
2017-08-29 09:36 pengbo Status feedback => closed