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

UPDATE logs CONFLICT message in Subscription's Postgres log #274

Open pratmeht opened 4 years ago

pratmeht commented 4 years ago

Hi,

We have 1 way replication setup from A to B (i.e., A has Replication Set created and B has Subscription created). forward_origin is set to {}. INSERTS, UPDATES and DELETES on A are replicating fine on B, however UPDATES logs the message of CONFLICT in B's Postgres log file (like the one given below). This happens for all the records. I tried, and tested with different table. Is this normal ?

pglogical version: 2.3.2 Postgresql version: 12.3

2020-07-29 12:50:49.961 IST [12253] LOG: CONFLICT: remote UPDATE on relation rwschema.cities111 (local index cities111_pkey). Resolution: apply_remote. 2020-07-29 12:50:49.961 IST [12253] DETAIL: existing local tuple {col1[numeric]:8 city[varchar]:Munich country[varchar]:Deutschland population[numeric]:300003} xid=1870618,origin=0,timestamp=2020-07-29 12:50:38.82503+05:30; remote tuple {col1[numeric]:8 city[varchar]:Munich country[varchar]:Deutschland population[numeric]:300005} in xact origin=1,timestamp=2020-07-29 12:50:49.944766+05:30,commit_lsn=0/1E6A6348 2020-07-29 12:50:49.961 IST [12253] CONTEXT: apply UPDATE from remote relation rwschema.cities111 in commit before 0/1E6A6348, xid 1869814 committed at 2020-07-29 12:50:49.944766+05:30 (action #2) from node replorigin 1

rauanmayemir commented 3 years ago

@pratmeht It's all in the docs. You can set the log level to something less verbose, e.g:

SET pglogical.conflict_log_level = 'FATAL';