From 8cfbdcfcd4173b77ac8434e8c1cb984926f4fc49 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Mon, 11 May 2015 09:44:57 +0200 Subject: [PATCH] Track list of already existing physical replication slots Drop replication slot when it was removed from etcd. Execute pg_create_physical_replication_slot only when something new appeared in etcd. --- helpers/ha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/ha.py b/helpers/ha.py index 725918b3..633ececf 100644 --- a/helpers/ha.py +++ b/helpers/ha.py @@ -74,7 +74,7 @@ class Ha: self.state_handler.follow_the_leader(self.fetch_current_leader()) return "no action. i am a secondary and i am following a leader" else: - if not self.state_handler.is_running(): + if not self.state_handler.is_running(): # XXX is_running == is_healthy self.state_handler.start() return "postgresql was stopped. starting again." return "no action. not healthy enough to do anything."