Skip to content

[DPE-7882] Reinstate logical replication on the single-kernel library - #1941

Draft
marceloneppel wants to merge 1 commit into
16/edgefrom
dpe-7882-reinstate-logical-replication
Draft

[DPE-7882] Reinstate logical replication on the single-kernel library#1941
marceloneppel wants to merge 1 commit into
16/edgefrom
dpe-7882-reinstate-logical-replication

Conversation

@marceloneppel

Copy link
Copy Markdown
Member

Issue

Logical replication has been disabled in this charm since #1258 pending the module's migration onto the single-kernel library. Reinstating it also ships the fix for #1085 (cyclic logical replication setups loop inserts forever; they must be blocked instead).

Solution

  • Pins postgresql-charms-single-kernel to the commit carrying the library's logical-replication migration PRs ([DPE-11044] feat(logical-replication): port the offer-side relation handler (1/5) postgresql-single-kernel-library#266..[DPE-2838] Secret labels #270, commit 33c8fcb502677e8711c393528237e7522dc6440b) until they are released as 16.3.11.
  • Re-enables the feature surface reverted by Disable logical replication #1258: the logical-replication-subscription-request options in config.yaml, the two logical-replication relations in metadata.yaml, the handler construction and its hook wiring in charm.py, and the restore-action guard in backups.py.
  • Adds tests/integration/ha_tests/test_logical_replication_circular.py, adapted from the K8s charm's fix PR to the VM helpers, verifying that direct (A <-> B) and multi-hop (A -> B -> C -> A) circular setups end in a blocked status mentioning circular replication.

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Sep 4, 2026
Re-enables the logical replication feature the library now owns
(canonical/postgresql-single-kernel-library#266..#270, pinned to
33c8fcb502677e8711c393528237e7522dc6440b until released):

- config and metadata gain the subscription-request option and the
  two logical-replication relations back,
- the charm constructs the library handler and re-wires
  apply_changed_config, retry_validations, the blocked-status
  reporting, and the update-status early-exit exemption,
- the restore action rejects clusters with an active logical
  replication relation again,
- adds tests/integration/ha_tests/test_logical_replication_circular.py
  verifying that cyclic setups block instead of looping inserts
  forever (#1085), adapted from the K8s
  charm's fix PR to the VM helpers.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel
marceloneppel force-pushed the dpe-7882-reinstate-logical-replication branch from e7c9771 to 274b86e Compare September 4, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: Out of sync The charm libs used are out-of-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant