The issue started with the replication lag between Master and slave (Logical Replication Server) upto 30 GB lag and the lag wasn't coming down for a proper sync and was in catchup state. The subscription was dropped in slave and was recreated with (copy_data=false) option. Now the replication is streaming however, the data is missing in the slave.

Tried refreshing the publication, but it didn't help.

So now how to sync all the missed data from Master to slave without rebuilding the Logical replication server again?

1 Answer 1


The easiest way it just to drop the subscription, truncate the existing data from the replica side, and recreate it again this time without copy_data=false.

If you don't like copying the same data yet another time, you can try to fetch the missing data over postgres_fdw and insert it. How you will know which data is the missing data is not something we can tell you based on the info provided.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.