Skip to main content

is it possible to replicate only a partition ?

  • June 7, 2019
  • 3 replies
  • 9 views

vcarusi
Forum|alt.badge.img+1

Hi,
I have a big table around 100G/1600 columns/3 partitions. I need to replicate only a partition.

I found a solution :

  • copy the partition into a second table,
  • replicate this table

The downside is that all records from the first table are copied into the second table.
I would delete the second table and re-create it. But, I am afraid that the server will replicate (again) entire table. And I want to replicate only the last modifications.

Did someone have to replicate a partition ?
Thank you,
Veronica

3 replies

gyoung
  • New Participant
  • June 18, 2019

If you're not already using copy_partitions_to_table, I recommend it. This should copy only the records from the specified partition(s).


swalkaus
Forum|alt.badge.img
  • Participating Frequently
  • June 19, 2019

You can use copy_partitions_to_table on the source database to create a table with the partitions you want to replicate. That operation is relatively quick. It is a metadata only copy, the storage is reference counted, not copied. Then replicate the newly created table to the target database and, finally, use move_partitions_to_table to transfer those partitions to the target table.


vcarusi
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • June 19, 2019

Thank you!
I already tested. It seems it copies only the modifications