mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-22 18:07:41 +00:00
postfix-2.11-20130318
This commit is contained in:
parent
c5d32fd76b
commit
8db6af2ac4
@ -18284,3 +18284,7 @@ Apologies for any names omitted.
|
|||||||
When a program opens an LMDB file larger than lmdb_map_size/3,
|
When a program opens an LMDB file larger than lmdb_map_size/3,
|
||||||
it logs a warning and uses a larger size limit instead.
|
it logs a warning and uses a larger size limit instead.
|
||||||
Files: util/dict_lmdb.c, proto/LMDB_README.html.
|
Files: util/dict_lmdb.c, proto/LMDB_README.html.
|
||||||
|
|
||||||
|
20130318
|
||||||
|
|
||||||
|
Portability: botched #ifdef. File: util/dict_lmdb.c.
|
||||||
|
@ -75,7 +75,7 @@ MEMCACHE_TABLE(5) MEMCACHE_TABLE(5)
|
|||||||
Postfix instance that will be responsible for cache
|
Postfix instance that will be responsible for cache
|
||||||
cleanup.
|
cleanup.
|
||||||
|
|
||||||
NOTE 2: When different tables share the same mem-
|
NOTE 2: When multiple tables share the same mem-
|
||||||
cache database, each table should use the <b>key_for-</b>
|
cache database, each table should use the <b>key_for-</b>
|
||||||
<b>mat</b> feature (see below) to prepend its own unique
|
<b>mat</b> feature (see below) to prepend its own unique
|
||||||
string to the lookup key. Otherwise, automatic
|
string to the lookup key. Otherwise, automatic
|
||||||
@ -112,15 +112,16 @@ MEMCACHE_TABLE(5) MEMCACHE_TABLE(5)
|
|||||||
|
|
||||||
<b>MEMCACHE KEY PARAMETERS</b>
|
<b>MEMCACHE KEY PARAMETERS</b>
|
||||||
<b>key_format (default: %s)</b>
|
<b>key_format (default: %s)</b>
|
||||||
Format of the lookup and update keys in memcache
|
Format of the lookup and update keys that the Post-
|
||||||
requests. By default, these are the same as the
|
fix memcache client sends to the memcache server.
|
||||||
lookup and update keys that are given to the Post-
|
By default, these are the same as the lookup and
|
||||||
fix memcache client.
|
update keys that the memcache client receives from
|
||||||
|
Postfix applications.
|
||||||
|
|
||||||
NOTE 1: The <b>key_format</b> feature is not used for
|
NOTE 1: The <b>key_format</b> feature is not used for
|
||||||
<b>backup</b> database requests.
|
<b>backup</b> database requests.
|
||||||
|
|
||||||
NOTE 2: When different tables share the same mem-
|
NOTE 2: When multiple tables share the same mem-
|
||||||
cache database, each table should prepend its own
|
cache database, each table should prepend its own
|
||||||
unique string to the lookup key. Otherwise, auto-
|
unique string to the lookup key. Otherwise, auto-
|
||||||
matic <a href="postscreen.8.html"><b>postscreen</b>(8)</a> or <a href="verify.8.html"><b>verify</b>(8)</a> cache cleanup may
|
matic <a href="postscreen.8.html"><b>postscreen</b>(8)</a> or <a href="verify.8.html"><b>verify</b>(8)</a> cache cleanup may
|
||||||
|
@ -79,7 +79,7 @@ NOTE 1: When sharing a persistent \fBpostscreen\fR(8) or
|
|||||||
*_cache_cleanup_interval = 0) except with one Postfix
|
*_cache_cleanup_interval = 0) except with one Postfix
|
||||||
instance that will be responsible for cache cleanup.
|
instance that will be responsible for cache cleanup.
|
||||||
|
|
||||||
NOTE 2: When different tables share the same memcache
|
NOTE 2: When multiple tables share the same memcache
|
||||||
database, each table should use the \fBkey_format\fR feature
|
database, each table should use the \fBkey_format\fR feature
|
||||||
(see below) to prepend its own unique string to the lookup
|
(see below) to prepend its own unique string to the lookup
|
||||||
key. Otherwise, automatic \fBpostscreen\fR(8) or \fBverify\fR(8)
|
key. Otherwise, automatic \fBpostscreen\fR(8) or \fBverify\fR(8)
|
||||||
@ -113,14 +113,16 @@ time. Smaller values are relative to the time of the update.
|
|||||||
.ad
|
.ad
|
||||||
.fi
|
.fi
|
||||||
.IP "\fBkey_format (default: %s)\fB"
|
.IP "\fBkey_format (default: %s)\fB"
|
||||||
Format of the lookup and update keys in memcache requests.
|
Format of the lookup and update keys that the Postfix
|
||||||
|
memcache client sends to the memcache server.
|
||||||
By default, these are the same as the lookup and update
|
By default, these are the same as the lookup and update
|
||||||
keys that are given to the Postfix memcache client.
|
keys that the memcache client receives from Postfix
|
||||||
|
applications.
|
||||||
|
|
||||||
NOTE 1: The \fBkey_format\fR feature is not used for \fBbackup\fR
|
NOTE 1: The \fBkey_format\fR feature is not used for \fBbackup\fR
|
||||||
database requests.
|
database requests.
|
||||||
|
|
||||||
NOTE 2: When different tables share the same memcache
|
NOTE 2: When multiple tables share the same memcache
|
||||||
database, each table should prepend its own unique string
|
database, each table should prepend its own unique string
|
||||||
to the lookup key. Otherwise, automatic \fBpostscreen\fR(8)
|
to the lookup key. Otherwise, automatic \fBpostscreen\fR(8)
|
||||||
or \fBverify\fR(8) cache cleanup may not work.
|
or \fBverify\fR(8) cache cleanup may not work.
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
# *_cache_cleanup_interval = 0) except with one Postfix
|
# *_cache_cleanup_interval = 0) except with one Postfix
|
||||||
# instance that will be responsible for cache cleanup.
|
# instance that will be responsible for cache cleanup.
|
||||||
#
|
#
|
||||||
# NOTE 2: When different tables share the same memcache
|
# NOTE 2: When multiple tables share the same memcache
|
||||||
# database, each table should use the \fBkey_format\fR feature
|
# database, each table should use the \fBkey_format\fR feature
|
||||||
# (see below) to prepend its own unique string to the lookup
|
# (see below) to prepend its own unique string to the lookup
|
||||||
# key. Otherwise, automatic \fBpostscreen\fR(8) or \fBverify\fR(8)
|
# key. Otherwise, automatic \fBpostscreen\fR(8) or \fBverify\fR(8)
|
||||||
@ -103,14 +103,16 @@
|
|||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
# .IP "\fBkey_format (default: %s)\fB"
|
# .IP "\fBkey_format (default: %s)\fB"
|
||||||
# Format of the lookup and update keys in memcache requests.
|
# Format of the lookup and update keys that the Postfix
|
||||||
|
# memcache client sends to the memcache server.
|
||||||
# By default, these are the same as the lookup and update
|
# By default, these are the same as the lookup and update
|
||||||
# keys that are given to the Postfix memcache client.
|
# keys that the memcache client receives from Postfix
|
||||||
|
# applications.
|
||||||
#
|
#
|
||||||
# NOTE 1: The \fBkey_format\fR feature is not used for \fBbackup\fR
|
# NOTE 1: The \fBkey_format\fR feature is not used for \fBbackup\fR
|
||||||
# database requests.
|
# database requests.
|
||||||
#
|
#
|
||||||
# NOTE 2: When different tables share the same memcache
|
# NOTE 2: When multiple tables share the same memcache
|
||||||
# database, each table should prepend its own unique string
|
# database, each table should prepend its own unique string
|
||||||
# to the lookup key. Otherwise, automatic \fBpostscreen\fR(8)
|
# to the lookup key. Otherwise, automatic \fBpostscreen\fR(8)
|
||||||
# or \fBverify\fR(8) cache cleanup may not work.
|
# or \fBverify\fR(8) cache cleanup may not work.
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20130317"
|
#define MAIL_RELEASE_DATE "20130318"
|
||||||
#define MAIL_VERSION_NUMBER "2.11"
|
#define MAIL_VERSION_NUMBER "2.11"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@ -471,21 +471,29 @@ DICT *dict_lmdb_open(const char *path, int open_flags, int dict_flags)
|
|||||||
msg_fatal("env_create %s: %s", mdb_path, mdb_strerror(status));
|
msg_fatal("env_create %s: %s", mdb_path, mdb_strerror(status));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For continued availability, try to ensure that the LMDB size limit is
|
* Try to ensure that the LMDB size limit is at least 3x the current LMDB
|
||||||
* at least 3x the current LMDB file size. This should be sufficient for
|
* file size. This should be sufficient to ensure that short-lived
|
||||||
* short-lived Postfix daemon processes.
|
* Postfix daemon processes can recover from a "table full" error.
|
||||||
|
*
|
||||||
|
* Note: readers must increase their LMDB size limit, too, otherwise they
|
||||||
|
* won't be able to continue reading a table after grows.
|
||||||
*/
|
*/
|
||||||
#ifdef SIZE_T_MAX
|
#ifndef SIZE_T_MAX
|
||||||
#define SIZE_T_MAX __MAXINT__(size_t)
|
#define SIZE_T_MAX __MAXINT__(size_t)
|
||||||
#endif
|
#endif
|
||||||
|
#define LMDB_SIZE_FUDGE_FACTOR 3
|
||||||
|
|
||||||
if (stat(mdb_path, &st) == 0 && st.st_size >= dict_lmdb_map_size / 2) {
|
if (stat(mdb_path, &st) == 0
|
||||||
msg_warn("%s: file size %lu >= (%s map size limit %ld)/3 -- "
|
&& st.st_size >= dict_lmdb_map_size / LMDB_SIZE_FUDGE_FACTOR) {
|
||||||
|
msg_warn("%s: file size %lu >= (%s map size limit %ld)/%d -- "
|
||||||
"using a larger map size limit",
|
"using a larger map size limit",
|
||||||
mdb_path, (unsigned long) st.st_size,
|
mdb_path, (unsigned long) st.st_size,
|
||||||
DICT_TYPE_LMDB, (long) dict_lmdb_map_size);
|
DICT_TYPE_LMDB, (long) dict_lmdb_map_size,
|
||||||
dict_lmdb_map_size = 3 * st.st_size;
|
LMDB_SIZE_FUDGE_FACTOR);
|
||||||
if (dict_lmdb_map_size / 3 != st.st_size)
|
/* Defense against naive optimizers. */
|
||||||
|
if (st.st_size < SIZE_T_MAX / LMDB_SIZE_FUDGE_FACTOR)
|
||||||
|
dict_lmdb_map_size = st.st_size * LMDB_SIZE_FUDGE_FACTOR;
|
||||||
|
else
|
||||||
dict_lmdb_map_size = SIZE_T_MAX;
|
dict_lmdb_map_size = SIZE_T_MAX;
|
||||||
}
|
}
|
||||||
if ((status = mdb_env_set_mapsize(env, dict_lmdb_map_size)))
|
if ((status = mdb_env_set_mapsize(env, dict_lmdb_map_size)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user