mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Return the real member name when picking the sync standby (#1253)
Before we returned it in the lower case, what was preventing such a standby from promoting due to the name comparison mismatch. Fixes https://github.com/zalando/patroni/issues/1252
This commit is contained in:
@@ -813,9 +813,9 @@ class Postgresql(object):
|
||||
return app_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 current, False
|
||||
return cluster.sync.sync_standby, False
|
||||
if sync_state in ('async', 'potential'):
|
||||
candidates.append(app_name)
|
||||
candidates.append(member.name)
|
||||
|
||||
if candidates:
|
||||
return candidates[0], False
|
||||
|
||||
Reference in New Issue
Block a user