Skip to content
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 93a999a commit 2a5d4314812bff7a0ebce2b0af84eee7e0e652d6 @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 2a5d431

Please sign in to comment.
Something went wrong with that request. Please try again.