shayonj / pg_easy_replicate

Easily setup logical replication and switchover to new database with minimal downtime
MIT License
945 stars 17 forks source link

Existing Data on target tables question #178

Open joetynan opened 1 week ago

joetynan commented 1 week ago

I was wondering - if there's existing data in a table, is that data overwritten when replication is established or is existing data left intact? Curious to see if perhaps I could speed up the initial data copy by doing a dump/restore of larger tables.

shayonj commented 4 days ago

pg_easy_replicate today doesn't allow the ability to copy & stream today, it just uses postgres Subscription + Publisher so Postgres will try to COPY the initial data, so its perhaps better to drop the data in target DB first. However, few pointers if its useful