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.
This commit is contained in:
Alexander Kukushkin
2015-05-11 09:44:57 +02:00
parent 588c951a86
commit 8cfbdcfcd4
+1 -1
View File
@@ -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."