Avoid opening replication connection on every cycle of HA loop (#1422)

Bug was introduces in the https://github.com/zalando/patroni/pull/1332
This commit is contained in:
Alexander Kukushkin
2020-02-27 12:22:11 +01:00
committed by GitHub
parent 0fa70e8d88
commit bcd75bbeeb
+1 -1
View File
@@ -204,7 +204,7 @@ class Ha(object):
if self.state_handler.role == 'standby_leader':
timeline = pg_control_timeline or self.state_handler.pg_control_timeline()
else:
timeline = self.state_handler.replica_cached_timeline(timeline)
timeline = self.state_handler.replica_cached_timeline(self._leader_timeline)
if timeline:
data['timeline'] = timeline
except Exception: