From 9e8ae95bce2df5003025c1f62e0c304da2d7cc79 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 15 Jan 2020 12:38:05 +0100 Subject: [PATCH] Finally fix a problem with case sensitivity of sync standby names (#1359) Close https://github.com/zalando/patroni/issues/1358 --- patroni/postgresql/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/postgresql/__init__.py b/patroni/postgresql/__init__.py index bed8aa7c..5c0ad8cc 100644 --- a/patroni/postgresql/__init__.py +++ b/patroni/postgresql/__init__.py @@ -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