Re: Heavy Logging in Subscriber side when configured LogicalReplication in 10.4 - Mailing list pgsql-admin

From Achilleas Mantzios
Subject Re: Heavy Logging in Subscriber side when configured LogicalReplication in 10.4
Date
Msg-id 771014ee-d282-f6db-911f-bfedac56c838@matrix.gatewaynet.com
Whole thread Raw
In response to Re: Heavy Logging in Subscriber side when configured LogicalReplication in 10.4  (pavan95 <pavan.postgresdba@gmail.com>)
Responses Re: Heavy Logging in Subscriber side when configured LogicalReplication in 10.4
List pgsql-admin
On 04/09/2018 08:58, pavan95 wrote:
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.
As David said, this is wrong. In the subscriber side you start with plain schema and no data.
https://www.postgresql.org/docs/10/static/logical-replication-subscription.html
"
The schema definitions are not replicated, and the published tables must exist on the subscriber
"

"
Each subscription will receive changes via one replication slot (see Section 26.2.6). Additional temporary replication slots may be required for the initial data synchronization of pre-existing table data.
"
https://www.postgresql.org/docs/10/static/logical-replication-architecture.html
"
Logical replication starts by copying a snapshot of the data on the publisher database.
"

This all implies that the tables on the subscriber must be empty before creating the subscription.



-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

pgsql-admin by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Heavy Logging in Subscriber side when configured LogicalReplication in 10.4
Next
From: pavan95
Date:
Subject: Re: Heavy Logging in Subscriber side when configured LogicalReplication in 10.4