table_info on remote table

Michael McDaniel erlang@REDACTED
Fri Feb 24 06:57:16 CET 2006


On Thu, Feb 23, 2006 at 09:32:37PM -0500, tty@REDACTED wrote:
> Hi,
> 
> I have a question regarding table_info. How does one make it work with a remote table ?
> 
> Scenerio:
> 
> Node A had a table 'tabA' with several entries, Node B was started using -mnesia extra_db_nodes pointing to Node A. I can see 'tabA' from Node B, do mnesia:read/1 etc but my mnesia:table_info(tabA, size) always return 0. However doing a length(mnesia:dirty_all_keys(tabA)) gives me the proper answer leading me to suspect I'm  missing something. 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 I have experienced that myself.  I presumed (perhaps mistakenly) that 
 it was due to mnesia:table_info/2 working with local tables only.  I
 presumed that based on a "clue" from the documentation:

 "
  table_info(Tab, InfoKey) -> Info | exit({aborted, Reason})

  ... arguments ... , the second is one of the following keys:

  all: This argument returns a list of all local table information. ...
 "

 Since it says "all local table information" it appeared to be the
 reason it would not work from a remote node.

 That would be swell if there is some other correctable reason why it
 would not work from a remote node.

~Michael


> 
> Thanks
> 
> Tee



More information about the erlang-questions mailing list