0

I am in the middle of setting up logical replication between 2 physical servers.

It involves 2 tables from the master with millions of rows. One table got 15 millions, and another one is 7 millions. Those tables have many indexes.

On the other hand, the slave tables are still empty and have no indexes, they are still fresh. The slave is actually a passive backup, so there is very much less traffic.

Firstly, I need to make a copy of that tables from master to the slave so that they will be the same from the beginning. Then start the publication and ultimately create the subscription. Correct ?

There are 2 main things here :

  1. Suppose copying data first is necessary. How can I copy huge amount of data from master to slave ? I have read some articles that copying a couple of millions rows taking up ages and slow down the server.

  2. Do I need to copy the data first then start the logical replication ? Or I just go ahead with logical replication without copying the data first. Anyway, the logical replication will copy the data automatically when it starts but I do think it will be slower than the conventional method like INSERT into table slave SELECT * FROM table master

Need your help.

Thanks

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.