2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.01k stars 153 forks source link

UPDATEs are not replicated ((tuple not found). Resolution: skip.) #330

Open oleksandrg opened 3 years ago

oleksandrg commented 3 years ago

Updates from TABLE A(PK column is integer) are correctly replicated but for TABLE B(PK varying(36)) all updates are failed with the same data:

PostgresSQL version:

Extensions (on btoh):

Test Tables: TABLE A:

CREATE TABLE myschema.test_idint (
    geometry public.geometry,
    id integer NOT NULL,
    note text
);
ALTER TABLE ONLY myschema.test_idint
    ADD CONSTRAINT test_idint_pkey PRIMARY KEY (id);

TABLE B:

CREATE TABLE myschema.test_idtext (
    id character varying(36) NOT NULL,
    geometry public.geometry,
    note text
);
ALTER TABLE ONLY myschema.test_idtext
    ADD CONSTRAINT test_idtext_pkey PRIMARY KEY (id);
2021-08-11 15:04:03.416 EEST [9706] CONTEXT:  apply (unknown action) in commit before 0/0, xid 0 committed at 2000-01-01 02:00:00+02 (action #0) from node replorigin 1
2021-08-11 15:04:03.416 EEST [9706] DEBUG:  changeset origin forwarding enabled: t
2021-08-11 15:04:03.416 EEST [9706] CONTEXT:  apply (unknown action) in commit before 0/0, xid 0 committed at 2000-01-01 02:00:00+02 (action #0) from node replorigin 1
2021-08-11 15:04:25.455 EEST [9713] DEBUG:  autovacuum: processing database "subreplica"
2021-08-11 15:04:30.841 EEST [9706] LOG:  CONFLICT: remote UPDATE on relation myschema.test_idtext replica identity index test_idtext_pkey (tuple not found). Resolution: skip.
2021-08-11 15:04:30.841 EEST [9706] DETAIL:  remote tuple {id[varchar]:(null) geometry[geometry]:(null) note[text]:note2_update} in xact origin=1,timestamp=2021-08-11 15:04:30.839311+03,commit_lsn=0/215CC50
2021-08-11 15:04:30.841 EEST [9706] CONTEXT:  apply UPDATE from remote relation myschema.test_idtext in commit before 0/215CC50, xid 507 committed at 2021-08-11 15:04:30.839311+03 (action #2) from node replorigin 1

Data was the same for both tables except PK. dmls.zip

Any ideas how we can resolve this? Thank you in advance

imaddi47 commented 2 years ago

Have you got your answer yet??