From fce19552184fd3cf8a79402a24e36917e9301a98 Mon Sep 17 00:00:00 2001 From: ksarabu1 <62157128+ksarabu1@users.noreply.github.com> Date: Thu, 13 Aug 2020 10:08:14 -0400 Subject: [PATCH] Fix to skip physical replication slot creation for leader node with special chars (#1651) Patroni appeared to be creating dormant slot (when `slots` defined) for leader node when the name contains special chars such as '-' (for e.g. "abc-us-1"). --- patroni/dcs/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patroni/dcs/__init__.py b/patroni/dcs/__init__.py index 16f79e99..d4ad9875 100644 --- a/patroni/dcs/__init__.py +++ b/patroni/dcs/__init__.py @@ -500,7 +500,8 @@ class Cluster(namedtuple('Cluster', 'initialize,config,leader,last_leader_operat value['type'] = 'logical' if value.get('database') and value.get('plugin') else 'physical' if value['type'] == 'physical': - if name != my_name: # Don't try to create permanent physical replication slot for yourself + # Don't try to create permanent physical replication slot for yourself + if name != slot_name_from_member_name(my_name): slots[name] = value continue elif value['type'] == 'logical' and value.get('database') and value.get('plugin'):