[erlang-questions] swapping tables in mnesia

Philip Clarke <>
Wed Nov 28 15:06:19 CET 2012


Hi,

Is it possible to swap or replace tables in mnesia ?

For example, say I have a file which is read and parsed by some erlang
process and then stored in a mnesia table.  When it is ready, the table
data is used by some other processes.

Then at some later time, I get a new version of the file.  I don't want to
delete the existing table and load it up from the new file (the system
would not be able to function during the load time).

I would like for example to load up to a table called e.g. temp and when
that has finished, replace my existing table with the temp table.

One option I considered is to just keep loading up to new tables e.g.
version1, version2, version3 etc. and then have another table which keeps
the name of the table to use.  I'm interested to hear if anyone has a
better solution.

Thanks
Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121128/2a295b15/attachment.html>


More information about the erlang-questions mailing list