From: Muhammad Usama Date: Thu, 14 Jun 2018 08:59:53 +0000 (+0500) Subject: Fix for wrong backend roles on standby after the failover X-Git-Tag: V4_0_0_ALPHA1~66 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=0116131b3897900c4e43c3c41afe5f7cc4abe985;p=pgpool2.git Fix for wrong backend roles on standby after the failover Pgpool standby nodes were getting the "require_backend_sync" signal before the active/master Pgpool had finish the failover. As a results the standby was getting the wrong backend node statuses. The cause was a simple coding mistake where failover indication function was passed with the wrong argument. Problem reported by Bo Peng --- diff --git a/src/watchdog/wd_commands.c b/src/watchdog/wd_commands.c index 4b7ab6a5b..2d0bee7c9 100644 --- a/src/watchdog/wd_commands.c +++ b/src/watchdog/wd_commands.c @@ -893,14 +893,14 @@ open_wd_command_sock(bool throw_error) WDFailoverCMDResults wd_failover_start(void) { if (pool_config->use_watchdog) - return wd_send_failover_func_status_command(0); + return wd_send_failover_func_status_command(true); return FAILOVER_RES_PROCEED; } WDFailoverCMDResults wd_failover_end(void) { if (pool_config->use_watchdog) - return wd_send_failover_func_status_command(1); + return wd_send_failover_func_status_command(false); return FAILOVER_RES_PROCEED; }