lmdb
Warning
The LMDB backend is considered stable as of 4.4.0. Version 4.3.0 was stable but had an important known bug, that affects anybody with big records such as long TXT content.
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.
lmdb-filename
¶Path to the LMDB file (e.g. /var/lib/powerdns/pdns.lmdb)
Warning
On systemd systems,
When running PowerDNS via the provided systemd service file, 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.
lmdb-shards
¶Records database will be split into this number of shards e.g. lmdb-shards=64 Default is 2 on 32 bits systems, and 64 on 64 bits systems.
lmdb-sync-mode
¶Changed in version 4.9.0.
mapasync
choice removed
sync
(default since 4.9.0)lmdb-sync-mode=
nosync
nometasync
mapasync
(default before 4.9.0)sync
behaviour.
The mapasync
choice has been removed in version 4.9.0.lmdb-schema-version
¶Determines the maximum schema version LMDB is allowed to upgrade to. If the on disk LMDB database has a lower version than the current version of the LMDB schema the backend will not start, unless this setting allows it to upgrade the schema. If the version of the DB is already the same as the current schema version this setting is not checked and the backend starts normally.
The default value for this setting is the highest supported schema version for the version of PowerDNS you are starting. if you want to prevent automatic schema upgrades, explicitly set this setting to the current default before upgrading PowerDNS.
PowerDNS Version | LMDB Schema version |
---|---|
4.2.x | 1 |
4.3.x | 2 |
4.4.x to 4.6.x | 3 |
4.7.x and up | 4 |
4.8.x and up | 5 |
lmdb-random-ids
¶New in version 4.7.0.
Numeric IDs inside the database are generated randomly instead of sequentially. If some external process is synchronising databases between systems, this will avoid conflicts when objects (domains, keys, etc.) get added. This will also improve the detection of recreated zones for Catalog Zones producers.
lmdb-map-size
¶New in version 4.7.0.
Size, in megabytes, of each LMDB database. This number can be increased later, but never decreased. Defaults to 100 on 32 bit systems, and 16000 on 64 bit systems.
lmdb-flag-deleted
¶New in version 4.8.0.
Instead of deleting items from the database, flag them as deleted in the item’s Lightning Stream header. Only enable this if you are using Lightning Stream.
lmdb-lightning-stream
¶New in version 4.8.0.
Run in Lightning Stream compatible mode. This:
flag-deleted
onrandom-ids
onshards
is not set to 1
PowerDNS will create the database structure, no need to manually create the database schema. Also, it is not possible to directly query the LMDB DB, so recommendation is to use either the API, or pdnsutil.