mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-09-01 09:09:21 +00:00
Merge pull request #266 from zalando/feature/do_not_drop_active_slots
Do not drop active replication slots.
This commit is contained in:
@@ -900,7 +900,7 @@ $$""".format(name, ' '.join(options)), name, password, password)
|
||||
for slot in set(self._replication_slots) - set(slots):
|
||||
self.query("""SELECT pg_drop_replication_slot(%s)
|
||||
WHERE EXISTS(SELECT 1 FROM pg_replication_slots
|
||||
WHERE slot_name = %s)""", slot, slot)
|
||||
WHERE slot_name = %s AND NOT active)""", slot, slot)
|
||||
|
||||
# create new slots
|
||||
for slot in set(slots) - set(self._replication_slots):
|
||||
|
||||
Reference in New Issue
Block a user