chickadee » lmdb-lolevel » mdb-env-set-maxdbs

mdb-env-set-maxdbs env dbsprocedure

Set the maximum number of named databases for the environment.

This function is only needed if multiple databases will be used in the environment. Simpler applications that use the environment as a single unnamed database can ignore this option. This function may only be called after (mdb-env-create) and before (mdb-env-open).

Currently a moderate number of slots are cheap but a huge number gets expensive: 7-120 words per transaction, and every (mdb-dbi-open) does a linear search of the opened slots.

An environment handle returned by (mdb-env-create)

Some possible error conditions:

(exn lmdb EINVAL)
an invalid parameter was specified, or the environment is already open.