Hallvard Breien Furuseth wrote:
Francois Gnu writes:
Is the mechanism of recovery mdb database working fine?
MDB needs no recovery. You may lose the last commit or two, but the database will be consistent if the filesystem is correct.
Whoops - to clarify: You may lose the _last_ one or two commits, until they get flushed to disk. The one in progress, and maybe the last successful commit. Not just any random commit:-)
You can set up checkpointing to limit how long the last successful commit can be endangered. ...unless I read the code wrong. The manpage says "checkpoint" is only needed with "dbnosync". Hmm.
In the default mode (fully synchronous) you can only lose the in-progress transaction. With dbnosync you can lose whatever hasn't been checkpointed yet. There is another mode (recently added, not yet exposed in back-mdb) that only flushes the data, not the metadata. With that mode, you might lose the in-progress transaction and the immediately preceding commit. This mode is slightly faster than fully-synchronous, and slightly slower than fully asynch.