If an lmdb application configures a non-default maxreaders, this setting is ignored if a tool like mdb_copy is already running (maybe from crontab).
I suggest mdb_copy & co should use an MDB_TOOL env flag which requires the lockfile (if any) to be valid, and only partly reinitializes it. The upcoming MDB_ROBUST flag might also make use of this. An alternative would be to stuff this into the metapages, but that seems less flexible.
Hallvard Breien Furuseth wrote:
If an lmdb application configures a non-default maxreaders, this setting is ignored if a tool like mdb_copy is already running (maybe from crontab).
I suggest mdb_copy & co should use an MDB_TOOL env flag which requires the lockfile (if any) to be valid, and only partly reinitializes it. The upcoming MDB_ROBUST flag might also make use of this. An alternative would be to stuff this into the metapages, but that seems less flexible.
Require it to be valid - how? We could try reading the maxreaders out of it, but how do we know that it's actually valid?