Database / Mnesia intermediate to advanced Interview questions
What is mnesia:move_table_copy/3 used for?
This function is the standard tool for live data rebalancing and node decommissioning: moving a specific table's replica to a different node without a maintenance window where the table is unavailable.
mnesia:move_table_copy(person, 'nodeA@old_host', 'nodeD@new_host').
Common scenarios: migrating off aging hardware node by node, rebalancing which nodes hold which tables after adding new capacity to a cluster, or shrinking a table's footprint away from a node that's becoming overloaded. Because the table stays available throughout, this is preferred over a manual "delete then recreate" approach, which would risk a window of reduced availability or lost writes during the transition.
More Related questions...