Skip to content

[DPE-7882] fix(logical-replication): track replication chains and guard the publisher (3/8) - #268

Draft
marceloneppel wants to merge 3 commits into
lr-2-subscriber-validationfrom
lr-3-circular-chains
Draft

marceloneppel wants to merge 3 commits into
lr-2-subscriber-validationfrom
lr-3-circular-chains

Conversation

@marceloneppel

@marceloneppel marceloneppel commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Issue

Third PR of the logical replication migration series (after #267): the publisher-side guard for cyclic replication, part of fixing canonical/postgresql-operator#1085 and canonical/postgresql-k8s-operator#1052.

Solution

  • Publications now carry replication-chains metadata recording the app path a table's data took (built from our own subscription's chains, extended when republishing).
  • The offer side refuses to publish a table it is subscribed to from the requester: direct A <-> B loops on the same table and multi-hop A -> B -> C -> A loops both surface as publisher errors on the relation, which the subscriber side (next PR) turns into a blocked status.
  • The create-publication branch moves into _create_new_publication to keep process_offer under the complexity budget.
  • The subscriber-side circular helpers (_check_subscriber_circular_replication, _would_create_circular_replication) are introduced here unused; the next slice wires them into the subscriber's validation.

Checklist

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

@marceloneppel marceloneppel changed the title [DPE-7882] fix(logical-replication): track replication chains and guard the publisher (3/5) [DPE-7882] fix(logical-replication): track replication chains and guard the publisher (3/6) Oct 2, 2026
@marceloneppel
marceloneppel added this pull request to stack #343 October 5, 2026 17:45
@marceloneppel marceloneppel changed the title [DPE-7882] fix(logical-replication): track replication chains and guard the publisher (3/6) [DPE-7882] fix(logical-replication): track replication chains and guard the publisher (3/7) Oct 7, 2026
@marceloneppel
marceloneppel force-pushed the lr-3-circular-chains branch 2 times, most recently from 8b1ad3c to 83ddb1a Compare October 7, 2026 21:15
@marceloneppel marceloneppel changed the title [DPE-7882] fix(logical-replication): track replication chains and guard the publisher (3/7) [DPE-7882] fix(logical-replication): track replication chains and guard the publisher (3/8) Oct 7, 2026
@marceloneppel
marceloneppel removed this pull request from stack #343 October 7, 2026 22:36
@marceloneppel
marceloneppel added this pull request to stack #351 October 7, 2026 22:40
The only logical-replication-enabled charms were on the edge channel
(never stable), so no chain-less publisher version exists to fall back for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant