| From: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
|---|---|
| To: | jmajoor(at)sparklinglogic(dot)com |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>, Diego Fronza <diego(dot)fronza(at)percona(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Jan Wieck <jan(at)wi3ck(dot)info>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Zhijie Hou <houzhijie22(at)gmail(dot)com> |
| Subject: | Re: Conflict Detection and Resolution |
| Date: | 2026-11-24 07:23:59 |
| Message-ID: | CABdArM4qpywMuQLgdWAuTgMST2X+8wEdKxHb8W4g-kGu21pVfQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Nov 24, 2026 at 2:57 AM <jmajoor(at)sparklinglogic(dot)com> wrote:
>
> Now that the update_delete issue has been addressed, is conflict resolution going to be picked up again?
Yes, we plan to continue the conflict resolution work. But first we
want to fix a few gaps in conflict detection, because resolution can
only be as reliable as the detection it depends on:
1. Detecting conflicts correctly when a replication origin ID is
reused. Today, after a subscription is dropped and its origin ID is
reused, rows written by the old subscription look like local changes
of the new one, so real conflicts can be missed [1].
2. Keeping replication origin IDs the same across pg_upgrade. The
commit timestamp data copied by pg_upgrade still refers to the old
origin IDs, so after the upgrade conflicts can be reported wrongly or
missed [2].
3. Finding the target row reliably when it is updated concurrently
on the subscriber. Today the apply worker can miss the row, so the
remote UPDATE or DELETE is lost and the conflict is reported as
update_missing/delete_missing instead of
update_origin_differs/delete_origin_differs [3].
Once these are fixed, we can return to conflict resolution.
> Will this ultimately lead to full support for bi-directional logical replication?
>
I'm not sure what you mean by full support. Conflict resolution is one
important piece, but there are others too, such as replicating DDL. Is
there a particular setup or use case you're thinking of?
[1] https://postgr.es/m/CABdArM5k7wCxq+L2r9-mLOoPXe_iHgdeRMXc31oxvzSj=xPjFQ@mail.gmail.com
[2] https://postgr.es/m/CAFPTHDa5aP8ixTZBygGAe48E1N=DvuPzcXikw7bNKixLMN3pVg@mail.gmail.com
[3] https://postgr.es/m/CADzfLwXZVmbo11tFS_G2i+6TfFVwHU4VUUSeoqb+8UQfuoJs8A@mail.gmail.com
--
Thanks,
Nisha
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | David Rowley | 2026-11-24 07:22:35 | Re: [PATCH] Fix typo "Querys" in a pquery.c comment |