2

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?

asked Jan 4, 2023 at 6:32

1 Answer 1

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.

answered Jan 4, 2023 at 20:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.