[erlang-questions] Any reserved Mnesia table names?

Dániel Szoboszlay dszoboszlay@REDACTED
Tue Jul 9 15:45:18 CEST 2019


Hi,

Mnesia ram_copies and disc_copies tables are implemented as ETS tables, and
therefore share the same namespace with all other ETS tables on the node.
Unfortunately, the ETS table names used by applications are typically not
documented.

Observer has a built-in list
<https://github.com/erlang/otp/blob/bb4955e083e34be40a9e0d5c0831e5b1498d11df/lib/runtime_tools/src/observer_backend.erl#L726-L777>
of table names used in OTP, but that won't cover table names in in your
own/third party applications running on your node of course.

Regarding the table name user in particular, I don't think OTP would use
this name, so it's safe to use in your Mnesia db. (I don't understand why
is the user table on Observer's list, there's a system process called user, but
no table with the same name, as far as I know.) If you want to be sure
though, try prefixing all your table names with something unique (e.g.
myapp_user).

Cheers,
Daniel

On Tue, 9 Jul 2019 at 12:51, Frans Schneider <fchschneider@REDACTED> wrote:

> Hi list,
>
> A Mnesia table with the name `user' does only show up in the observer
> after selecting menu option 'View system tables'. Two questions:
> - which reserved table names exist and where to find them in the docs?
> - any harm done when I use a table name like `user'?
> Thanks,
>
> Frans
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190709/9af912d3/attachment.htm>


More information about the erlang-questions mailing list