mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Feature: ability to ignore externally managed replication slots (#1742)
There are sometimes good reasons to manage replication slots externally to Patroni. For example, a consumer may wish to manage its own slots (so that it can more easily track when a failover has a occurred and whether it is ahead of or behind the WAL position on the new primary). Additionally tooling like pglogical actually replicates slots to all replicas so that the current position can be maintained on failover targets (this also aids consumers by supplying primitives so that they can verify data hasn't been lost or a split brain occurred relative to the physical cluster). To support these use cases this new feature allows configuring Patroni to entirely ignore sets of slots specified by any subset of name, database, slot type, and plugin.
This commit is contained in:
@@ -38,6 +38,32 @@ Dynamic configuration is stored in the DCS (Distributed Configuration Store) and
|
||||
- **type**: slot type. Could be ``physical`` or ``logical``. If the slot is logical, you have to additionally define ``database`` and ``plugin``.
|
||||
- **database**: the database name where logical slots should be created.
|
||||
- **plugin**: the plugin name for the logical slot.
|
||||
- **ignore_slots**: list of sets of replication slot properties for which Patroni should ignore matching slots. This configuration/feature/etc. is useful when some replication slots are managed outside of Patroni. Any subset of matching properties will cause a slot to be ignored.
|
||||
- **name**: the name of the replication slot.
|
||||
- **type**: slot type. Can be ``physical`` or ``logical``. If the slot is logical, you may additionally define ``database`` and/or ``plugin``.
|
||||
- **database**: the database name (when matching a ``logical`` slot).
|
||||
- **plugin**: the logical decoding plugin (when matching a ``logical`` slot).
|
||||
|
||||
Note: **slots** is a hashmap while **ignore_slots** is an array. For example:
|
||||
|
||||
.. code:: YAML
|
||||
|
||||
slots:
|
||||
permanent_logical_slot_name:
|
||||
type: logical
|
||||
database: my_db
|
||||
plugin: test_decoding
|
||||
permanent_physical_slot_name:
|
||||
type: physical
|
||||
...
|
||||
ignore_slots:
|
||||
- name: ignored_logical_slot_name
|
||||
type: logical
|
||||
database: my_db
|
||||
plugin: test_decoding
|
||||
- name: ignored_physical_slot_name
|
||||
type: physical
|
||||
...
|
||||
|
||||
Global/Universal
|
||||
----------------
|
||||
|
||||
Reference in New Issue
Block a user