Finally fix a problem with case sensitivity of sync standby names (#1359)

Close https://github.com/zalando/patroni/issues/1358
This commit is contained in:
Alexander Kukushkin
2020-01-15 12:38:05 +01:00
committed by GitHub
parent a2a5cc2f71
commit 9e8ae95bce
+1 -1
View File
@@ -827,7 +827,7 @@ class Postgresql(object):
if state != 'streaming' or not member or member.tags.get('nosync', False):
continue
if sync_state == 'sync':
return app_name, True
return member.name, True
if sync_state == 'potential' and app_name == current:
# Prefer current even if not the best one any more to avoid indecisivness and spurious swaps.
return cluster.sync.sync_standby, False