Database / Mnesia intermediate to advanced Interview questions
How do you remove a table replica from a node without dropping the whole table?
mnesia:del_table_copy(Table, Node) removes just one node's copy of a table from the schema and
frees its local storage, while the table itself keeps running normally on every other node still holding a
copy — it's the inverse of add_table_copy/3.
mnesia:del_table_copy(session, 'nodeb@host').
This is the right tool when you're decommissioning a node, or deliberately reducing how many replicas a table has (say, to lower write coordination overhead once you no longer need that level of redundancy), without wanting to disrupt the table's availability on the remaining nodes. As long as at least one replica remains somewhere in the cluster, the table's data isn't lost by this operation.
More Related questions...