Don't remove the leader lock while paused
Close
@@ -1012,6 +1012,7 @@ class Ha(object):
if self.cluster.failover and self.cluster.failover.candidate == self.state_handler.name:
return 'waiting to become master after promote...'
+ if not self.is_standby_cluster():
self._delete_leader()
return 'removed leader lock because postgres is not running as master'
