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

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Heavy Logging in Subscriber side when configured Logical Replication in 10.4
Date: 2018-09-04 06:32:27
Message-ID: 771014ee-d282-f6db-911f-bfedac56c838@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 <https://www.postgresql.org/docs/10/static/warm-standby.html#STREAMING-REPLICATION-SLOTS>). 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message pavan95 2018-09-04 07:12:15 Re: Heavy Logging in Subscriber side when configured Logical Replication in 10.4
Previous Message David G. Johnston 2018-09-04 06:12:54 Re: Heavy Logging in Subscriber side when configured Logical Replication in 10.4