On Thu, 12 Sept 2024 at 14:03, Ajin Cherian <itsa...@gmail.com> wrote: > > On Tue, Sep 3, 2024 at 7:42 PM vignesh C <vignes...@gmail.com> wrote: > > On Fri, 30 Aug 2024 at 11:01, Nisha Moond <nisha.moond...@gmail.com> > wrote: > > > > Here is the v11 patch-set. Changes are: >
I was reviewing the CONFLICT RESOLVER (insert_exists='apply_remote') and found that one conflict remains unresolved in the following scenario: Pub: CREATE TABLE circles(c1 CIRCLE, c2 text, EXCLUDE USING gist (c1 WITH &&)); CREATE PUBLICATION pub1 for table circles; Sub: CREATE TABLE circles(c1 CIRCLE, c2 text, EXCLUDE USING gist (c1 WITH &&)) insert into circles values('<(0,0), 5>', 'sub'); CREATE SUBSCRIPTION ... PUBLICATION pub1 CONFLICT RESOLVER (insert_exists='apply_remote'); The following conflict is not detected and resolved with remote tuple data: Pub: INSERT INTO circles VALUES('<(0,0), 5>', 'pub'); 2024-09-19 17:32:36.637 IST [31463] 31463 LOG: conflict detected on relation "public.t1": conflict=insert_exists, Resolution=apply_remote. 2024-09-19 17:32:36.637 IST [31463] 31463 DETAIL: Key already exists in unique index "t1_pkey", modified in transaction 742, applying the remote changes. Key (c1)=(1); existing local tuple (1, sub); remote tuple (1, pub). 2024-09-19 17:32:36.637 IST [31463] 31463 CONTEXT: processing remote data for replication origin "pg_16398" during message type "INSERT" for replication target relation "public.t1" in transaction 744, finished at 0/1528E88 ........ 2024-09-19 17:32:44.653 IST [31463] 31463 ERROR: conflicting key value violates exclusion constraint "circles_c1_excl" 2024-09-19 17:32:44.653 IST [31463] 31463 DETAIL: Key (c1)=(<(0,0),5>) conflicts with existing key (c1)=(<(0,0),5>). ........ Regards, Vignesh