Re: Logical Replication speed-up initial data
Christophe Pettus <xof@thebuild.com>
From: Christophe Pettus <xof@thebuild.com>
To: Nikhil Shetty <nikhil.dba04@gmail.com>
Cc: Pgsql Performance <pgsql-performance@lists.postgresql.org>
Date: 2021-08-04T16:28:06Z
Lists: pgsql-performance
> On Aug 4, 2021, at 08:06, Nikhil Shetty <nikhil.dba04@gmail.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.