Browse files

Fix a problem that caused a standby to promote itself without going to

voting procedure.

This is because of a race condition inside CheckPrimaryConnection().

This has independently reported by Alex Railean and Dumitru, and Frank Jördens.
Analyzed and fixed by Cédric Villemain.

The fix have been verified to work by Frank
  • Loading branch information...
1 parent 1b69282 commit 81b8a944de49d37c8f331656a9d65355265265e3 @Jaime2ndQuadrant Jaime2ndQuadrant committed Dec 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 repmgrd.c
2 repmgrd.c
@@ -792,7 +792,7 @@ CheckPrimaryConnection(void)
log_info(_("%s: Connection to master has been restored.\n"), progname);
- break;
+ return true;
if (!is_pgup(primaryConn, local_options.master_response_timeout))

0 comments on commit 81b8a94

Please sign in to comment.