Use replication credentials when checking leader status (#2165)

It could be that `remove_data_directory_on_diverged_timelines` is set, but there is no `rewind_credentials` defined and superuser access between nodes is not allowed.

Close https://github.com/zalando/patroni/issues/2162
This commit is contained in:
Alexander Kukushkin
2022-01-11 16:23:13 +01:00
committed by GitHub
parent cb3071adfb
commit 3e1076a574
+1 -1
View File
@@ -165,7 +165,7 @@ class Rewind(object):
return
if not self.check_leader_is_not_in_recovery(
self._conn_kwargs(leader, self._postgresql.config.rewind_credentials)):
self._conn_kwargs(leader, self._postgresql.config.replication)):
return
history = need_rewind = None