13 * Launch name: ``lmdb``
18 When building PowerDNS yourself, append ``lmdb`` to ``--with-modules`` or ``--with-dynmodules``. It is expected that most pre-built packages contain this backend or be separately installable.
24 .. _setting-lmdb-filename:
29 Path to the LMDB file (e.g. */var/spool/powerdns/pdns.lmdb*)
33 When running PowerDNS via the provided systemd service file, `ProtectSystem <http://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=>`_ is set to ``full``, this means PowerDNS is unable to write to e.g. ``/etc`` and ``/home``, possibly being unable to write to the LMDB database.
35 .. _setting-lmdb-shards:
40 Records database will be split into this number of shards e.g. lmdb-shards=64
41 Default is 2 on 32 bits systems, and 64 on 64 bits systems.
43 .. _setting-lmdb-sync-mode:
48 Synchronisation mode: sync, nosync, nometasync, mapasync
51 * ``sync``: LMDB synchronous mode. Safest option, but also slightly slower. Can also be enabled with ``lmdb-sync-mode=``
52 * ``nosync``: don't flush systems buffers to disk when committing a transation.
53 This means a system crash can corrupt the database or lose the last transactions if buffers are not yet flushed to disk.
54 * ``nometasync``: flush system buffers to disk only once per transaction, omit the metadata flush. This maintains database integrity, but can potentially lose the last committed transaction if the operating system crashes.
55 * ``mapasync``: (default). Use asynchronous flushes to disk. As with nosync, a system crash can then corrupt the database or lose the last transactions.
61 PowerDNS will create the database structure, no need to manually create the database schema.
62 Also, it is not possible to directly query the LMDB DB, so recommendation is to use either the API, or pdnsutil.