Re: Logical Replication speed-up initial data

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com>
Cc: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Logical Replication speed-up initial data
Date: 2021-08-04 16:28:06
Message-ID: 4A8EFC4E-A264-457D-A8E7-AE324ED9ABD4@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> On Aug 4, 2021, at 08:06, Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com> wrote:
>
> How can we increase the speed of the initial data load without dropping the indexes on destination?

You can do the usual steps of increasing checkpoint_timeout and max_wal_size (since incoming logical replication changes are WAL logged) and setting synchronous_commit = off, but those will be modest improvements. You will get an enormous benefit from dropping indexes and foreign key constraints, and those aren't much use during the initial sync anyway.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Nikhil Shetty 2021-08-05 04:56:59 Re: Logical Replication speed-up initial data
Previous Message Stefano Amoroso 2021-08-04 15:55:04 Re: Logical Replication speed-up initial data