[erlang-questions] Reusing mnesia schema on different nodes

Kenneth Lakin <>
Sat Oct 15 15:16:23 CEST 2016


On 10/15/2016 04:09 AM, ARUN P wrote:
> but i have a doubt, since the dets operations are not transactional in
> the middle editing schema.DAT file, if my application gets restart...

Based on Szoboszlay's earlier email to you it sounds like you'll be
doing the search and replace on the Mnesia schema file while Mnesia is
stopped.

From his message: [0]

"Before starting Mnesia open the schema.DCD or schema.DAT file
(depending on the storage type of your schema). It will be either a
disk_log or a dets file, containing {schema, Tab, Opts} entries. Among
the options you will find the node(s) where the table shall exist.
Simply change the old node name to the new node name there, and save the
new schema under its original file name. Then you can start Mnesia and
all your data will be there."

So, as long as Mnesia is not started on the node, then -AFAIK- nothing
will be writing to the Mnesia schema file.

[0] http://erlang.org/pipermail/erlang-questions/2016-October/090601.html


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161015/1cb060f9/attachment.bin>


More information about the erlang-questions mailing list