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").
This commit is contained in:
ksarabu1
2020-08-13 16:08:14 +02:00
committed by GitHub
parent a6faf9b2d9
commit fce1955218
+2 -1
View File
@@ -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'):