Repository navigation
[DPE-7882] fix(logical-replication): block restore with an active logical replication relation (7/8) - #338
Draft
marceloneppel wants to merge 6 commits into
Draft
[DPE-7882] fix(logical-replication): block restore with an active logical replication relation (7/8)#338marceloneppel wants to merge 6 commits into
marceloneppel wants to merge 6 commits into
Conversation
marceloneppel
requested review from
carlcsaposs-canonical,
dragomirp,
juju-charm-bot,
oleksii-buhaiov,
taurus-forever and
xavipg003
and removed request for
a team
October 2, 2026 18:45
2 tasks
marceloneppel
marked this pull request as draft
October 2, 2026 18:51
marceloneppel
removed request for
carlcsaposs-canonical,
dragomirp,
juju-charm-bot,
oleksii-buhaiov,
taurus-forever and
xavipg003
October 2, 2026 18:52
marceloneppel
added this pull request to stack #343
October 5, 2026 17:45
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 5, 2026 18:28
b869403 to
e776ca0
Compare
Draft
2 tasks
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 7, 2026 19:01
e776ca0 to
f9466f8
Compare
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 7, 2026 21:18
a6ec6fc to
8904807
Compare
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 7, 2026 22:00
8904807 to
b54b99d
Compare
marceloneppel
removed this pull request from stack #343
October 7, 2026 22:36
2 tasks
marceloneppel
added this pull request to stack #351
October 7, 2026 22:40
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 8, 2026 04:02
dba1948 to
78e0a3b
Compare
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 9, 2026 19:30
78e0a3b to
ff3f106
Compare
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 9, 2026 19:44
ff3f106 to
9bf1c3d
Compare
…ation relation
The charms' pre-migration restore flow guarded against an active logical replication relation, but only ever as commented-out dead code in src/backups.py ('Unit cannot restore backup with an active logical replication connection'); when the backups world moved the restore guards into the library, RestoreManager inherited the standby-cluster and async-relation guards while the LR check was dropped, and the module-port series does not add it. Restoring while the cluster publishes or subscribes over logical replication replaces the PGDATA the relation replicates, so it must be blocked like the async case.
Reject the restore in _pre_restore_cluster_checks beside the async guard: the requires-side relation via get_relation (limit 1) and every relation on the logical-replication-offer endpoint (no limit in the metadata). The message follows the async guard's 'relation' wording; the original charm string said 'connection' but the check was never active, so nothing depends on that text.
marceloneppel
force-pushed
the
lr-6-restore-guard
branch
from
October 9, 2026 20:22
9bf1c3d to
0f69c99
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
Seventh PR of the logical replication migration series (after #350): restore must be blocked while a logical replication relation is active.
Solution
RestoreManager._pre_restore_cluster_checksgains the LR guard beside the async one: restore is rejected withUnit cannot restore backup with an active logical replication relationwhen the cluster has an activelogical-replicationorlogical-replication-offerrelation.Checklist