On Tue, Nov 24, 2026 at 10:56 PM <[email protected]> wrote: > > Thanks for the reply. > > The term "full" is indeed not very helpful. > In my particular case I am not interested in DDL.
Thanks a lot for explaining your setup in detail. IIUC, these points are separate from the conflict resolution work discussed in this thread, which is about resolving conflicts while applying replicated changes. I think, each of them is an improvement worth discussing on its own. > Currently using pglogical, but there are limitations to their approach. It is > easy to get into a circular replication loop, which can only be broken by > using the forward-origin setting. However, that doesn't allow for some > replication scenarios. If I have 2 regions east and west and in each region > you have 2 instances. E1 and E2 are bi-directional and to prevent a loop E2 > can get everything from E1, but E1 can only get local origin from E2 (same > for W1, W2). If you connect E1 and W1 together, then the changes on E2 and W2 > are not replicated into all instances due to the forward origin settings. > Core logical replication has a similar option, origin = none, which publishes only changes made locally on the publisher. So it has the same limitation in your topology: E2's changes reach E1, but E1 does not forward them to W1. Today, getting all changes to all four instances can be done with a full mesh, where each instance subscribes directly to every other instance with origin = none. In your setup: - E1 subscribes to E2, W1 and W2 - E2 subscribes to E1, W1 and W2 - W1 subscribes to E1, E2 and W2 - W2 subscribes to E1, E2 and W1 Each instance publishes its tables once, and the other three subscribe to that publication. A change made on E2 is then sent by E2 directly to E1, W1 and W2. Because every subscription uses origin = none, none of them forwards it any further, so there are no loops. Smarter forwarding, e.g. filtering by a list of origins, would be a separate feature. > Another limitation is the initial data sync, since that is just a bulk copy > it doesn't apply any conflict rules and this forces you to basically delete > everything followed by a data sync and replication. > Right, the initial sync is a bulk copy, so no conflict rules apply to it. Handling conflicts during the copy, so that it can work against existing data, would extend the resolution work to table sync. If the data on both sides is already the same, copy_data = false avoids the full copy. > Lastly if you unsubscribe and at a later point re-subscribe, then pglogical > can not replicate from the last known replication point and requires a full > delete/data sync/replication again. This may not be as important. > I think this is already supported in core. If you disable the subscription (ALTER SUBSCRIPTION ... DISABLE) and enable it later, replication resumes from where it stopped, as long as the subscription and its slot on the publisher are kept. The cost is that the slot holds back WAL on the publisher while the subscription is disabled, so max_slot_wal_keep_size, or idle_replication_slot_timeout if set, can invalidate the slot during a long pause. -- Thanks, Nisha
