Metadata in WiredTiger is stored as a table in the "WiredTiger.wt"
file. The table's key is a uri
string, and the value is its complete configuration string. The configuration itself is a list of key/value pairs in string form. The configuration's keys are dependent on the type of uri
. Thus, a metadata entry with a uri
key beginning with "table:"
will be a configuration string having configuration entries like key_format
and value_format
to describe the data encoding for the uri. A metadata key beginning with "file:"
will have a different set of configuration entries associated with it.
A caller of WiredTiger can use WT_SESSION::open_cursor with a uri
equal to "meta:"
to read the metadata. Using this interface, metadata can only be queried, not changed. Changes to the metadata are affected by API calls such as WT_SESSION::create, WT_SESSION::drop, WT_SESSION::rename.