Any reserved Mnesia table names?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Any reserved Mnesia table names?

Schneider-3
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
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Any reserved Mnesia table names?

Dániel Szoboszlay
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 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 <[hidden email]> 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
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Any reserved Mnesia table names?

Schneider-3
Thanks for the info, especially the list with namens from observer. 

Frans

Op 9 jul. 2019 om 15:45 heeft Dániel Szoboszlay <[hidden email]> het volgende geschreven:

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 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 <[hidden email]> 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
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions