Add ignore_slots support to Patroni DCS configuration#3021
Add ignore_slots support to Patroni DCS configuration#3021PavelZaytsev wants to merge 5 commits intozalando:masterfrom
Conversation
- Add ignore_slots field to Patroni struct in CRD
- Add ignore_slots to patroniDCS struct for Spilo configuration
- Generate ignore_slots in SPILO_CONFIGURATION when specified
- Update CRD manifest to accept ignore_slots field
- Add unit test for ignore_slots configuration
This enables PostgreSQL 17 native 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:
patroni:
ignore_slots:
- type: logical
This instructs Patroni to ignore logical replication slots during failover,
which is essential for PostgreSQL 17's native logical slot synchronization
feature where slots are automatically synced to standbys.
|
Cannot start a pipeline due to: Click on pipeline status check Details link below for more information. |
|
Cannot start a pipeline due to: Click on pipeline status check Details link below for more information. |
|
Hi @mikkeloscar could someone from the maintainers team look into this PR when they get the chance/run CI/CD? |
|
Cannot start a pipeline due to: Click on pipeline status check Details link below for more information. |
|
Cannot start a pipeline due to: Click on pipeline status check Details link below for more information. |
|
@FxKu @hughcapet @mikkeloscar can someone from the zalando team run the check-in pipeline on the PR plz |
|
Cannot start a pipeline due to: Click on pipeline status check Details link below for more information. |
|
Every cluster switchover leads to Debezium full initial snapshot. |
|
@FxKu @hughcapet |
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)