Add ignore_slots support to Patroni DCS configuration #3021
+36
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
PostgreSQL 17 introduced native logical replication slot synchronization, where logical slots are synced to standby servers. However, if both enabled, Patroni's logical slot failover inteferes resulting in a faulty behavior. This PR adds support for Patroni's
ignore_slotsDCS configuration to allow operators to exclude specific slot types (e.g., logical slots) from failover blocking.Implementation
This enables PostgreSQL 17 (and user-defined) slot synchronization support by allowing users to configure Patroni to ignore specific replication slot types (e.g., logical slots) during failover operations.
Users can now configure ignore_slots in their PostgreSQL manifest:
This instructs Patroni to ignore logical replication slots during failover.
Testing
k8sres_test.gofor ignore_slots configurationpatronictl show-config)