xref: /netbsd-src/external/ibm-public/postfix/dist/html/lmdb_table.5.html (revision 9573673d78c64ea1eac42d7f2e9521be89932ae5)
1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2        "http://www.w3.org/TR/html4/loose.dtd">
3<html> <head>
4<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
5<title> Postfix manual - lmdb_table(5) </title>
6</head> <body> <pre>
7LMDB_TABLE(5)                                                    LMDB_TABLE(5)
8
9<b>NAME</b>
10       lmdb_table - Postfix LMDB adapter
11
12<b>SYNOPSIS</b>
13       <b>postmap <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i>
14       <b>postmap -i <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> &lt;<i>inputfile</i>
15
16       <b>postmap -d "</b><i>key</i><b>" <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i>
17       <b>postmap -d - <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> &lt;<i>inputfile</i>
18
19       <b>postmap -q "</b><i>key</i><b>" <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i>
20       <b>postmap -q - <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/</b><i>filename</i> &lt;<i>inputfile</i>
21
22<b>DESCRIPTION</b>
23       The  Postfix  LMDB  adapter  provides  access  to a persistent, memory-
24       mapped, key-value store.  The database size is limited only by the size
25       of  the  memory  address  space  (typically  31 or 47 bits on 32-bit or
26       64-bit CPUs, respectively) and by the available file system space.
27
28<b>REQUESTS</b>
29       The LMDB adapter supports all Postfix lookup  table  operations.   This
30       makes  LMDB  suitable  for  Postfix  address rewriting, routing, access
31       policies, caches, or any information that can be stored under  a  fixed
32       lookup key.
33
34       When  a  transaction  fails due to a full database, Postfix resizes the
35       database and retries the transaction.
36
37       Postfix table lookups may generate partial search keys such  as  domain
38       names  without one or more subdomains, network addresses without one or
39       more least-significant octets, or email addresses  without  the  local-
40       part, address extension or domain portion.  This behavior is also found
41       with, for example, <a href="DATABASE_README.html#types">btree</a>:, <a href="DATABASE_README.html#types">hash</a>:, or <a href="ldap_table.5.html">ldap</a>: tables.
42
43       Unlike other flat-file Postfix databases, changes to an  LMDB  database
44       do  not  trigger  automatic  daemon program restart, and do not require
45       "<b>postfix reload</b>".
46
47<b>RELIABILITY</b>
48       LMDB's copy-on-write architecture provides safe updates, at the cost of
49       using  more space than some other flat-file databases.  Read operations
50       are memory-mapped for speed.  Write operations are not memory-mapped to
51       avoid silent curruption due to stray pointer bugs.
52
53       Multiple processes can safely update an LMDB database without serializ-
54       ing requests through the <a href="proxymap.8.html">proxymap(8)</a> service.  This makes LMDB suitable
55       as a shared cache for <a href="verify.8.html">verify(8)</a> or <a href="postscreen.8.html">postscreen(8)</a> services.
56
57<b>SYNCHRONIZATION</b>
58       The  Postfix  LMDB adapter does not use LMDB's built-in locking scheme,
59       because that would require world-writable lockfiles and  would  violate
60       the  Postfix security model.  Instead, Postfix uses fcntl(2) locks with
61       whole-file granularity.  Programs that use LMDB's built-in locking pro-
62       tocol will corrupt a Postfix LMDB database or will read garbage.
63
64       Every Postfix LMDB database read or write transaction must be protected
65       from start to end with a shared or exclusive fcntl(2) lock.   A  writer
66       may  atomically  downgrade  an  exclusive lock to a shared lock, but it
67       must acquire an exclusive lock between updating the database and start-
68       ing another write transaction.
69
70       Note  that  fcntl(2)  locks do not protect transactions within the same
71       process against each other.  If a program cannot avoid making  simulta-
72       neous database requests, then it must protect its transactions with in-
73       process locks, in addition to the per-process fcntl(2) locks.
74
75<b>CONFIGURATION PARAMETERS</b>
76       Short-lived programs automatically pick up changes  to  <a href="postconf.5.html">main.cf</a>.   With
77       long-running  daemon programs, Use the command "<b>postfix reload</b>" after a
78       configuration change.
79
80       <b><a href="postconf.5.html#lmdb_map_size">lmdb_map_size</a> (default: 16777216)</b>
81              The initial LMDB database size limit in bytes.
82
83<b>SEE ALSO</b>
84       <a href="postconf.1.html">postconf(1)</a>, Postfix supported lookup tables
85       <a href="postmap.1.html">postmap(1)</a>, Postfix lookup table maintenance
86       <a href="postconf.5.html">postconf(5)</a>, configuration parameters
87
88<b>README FILES</b>
89       <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
90       <a href="LMDB_README.html">LMDB_README</a>, Postfix OpenLDAP LMDB howto
91
92<b>LICENSE</b>
93       The Secure Mailer license must be distributed with this software.
94
95<b>HISTORY</b>
96       LMDB support was introduced with Postfix version 2.11.
97
98<b>AUTHOR(S)</b>
99       Howard Chu
100       Symas Corporation
101
102       Wietse Venema
103       IBM T.J. Watson Research
104       P.O. Box 704
105       Yorktown Heights, NY 10598, USA
106
107                                                                 LMDB_TABLE(5)
108</pre> </body> </html>
109