Re: Heavy Logging in Subscriber side when configured Logical Replication in 10.4

From: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Heavy Logging in Subscriber side when configured Logical Replication in 10.4
Date: 2018-09-04 05:58:35
Message-ID: 1536040715349-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Achilleas,

>>>Either you created the subscription while the subscriber already had
existing data in the tables

I had taken a backup(along with data) and restored on both publisher and
subscriber. Later which I have created Publication and Subscription on both
the nodes.

>>so as a first step, try to find the offending row(s) in the subscriber and
then try to figure out how it was inserted there and by whom. Then delete
the row or do as needed to overcome the conflict.
>>There should be a detail entry in the LOG file like :
>>[local] [70002] 5b8cf8e3.11172 2018-09-03 12:03:56.342 EEST psql
postgres(at)dynacom line:4 DETAIL: >>Key (id)=(18) already exists.
>>That'll tell you the exact id.
Yes the error is exactly same as what you mentioned. And also I have
checked/compared that particular id on both publisher and subscriber and the
result is same data on both nodes.

>>If you don't want to do that because you are happier with the subscriber's
version of this id, then you should advance the position.
In this case how to do it? Is it done by using
"pg_replication_origin_advance('' , '') "? I have to use it for the first
time. How does it work ??
>>But for starters, you better solve this by handling the row manually .
There are around 40-70 lakh conflicts of the same type. How to cope with
it??

Looking forward for your response.

Regards,
Pavan

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2018-09-04 06:12:54 Re: Heavy Logging in Subscriber side when configured Logical Replication in 10.4
Previous Message Jammie 2018-09-04 01:02:47 Fwd: postgresql Logical Replication Stream fails with “Database connection failed when reading from copy”