changeset 7481:768231eb84cf HEAD

Added dict_db_config setting to point to a Berkeley DB config file.
author Timo Sirainen <tss@iki.fi>
date Sun, 04 May 2008 18:12:28 +0300
parents ad0f32abda6d
children 955ae7b7ad1a
files doc/dovecot-db.conf dovecot-example.conf src/master/dict-process.c src/master/master-settings-defs.c src/master/master-settings.c src/master/master-settings.h
diffstat 6 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/dovecot-db.conf	Sun May 04 18:12:28 2008 +0300
@@ -0,0 +1,11 @@
+# Example DB_CONFIG for Berkeley DB. Typically dict_db_config setting is used
+# to point to this file.
+# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html
+
+# Maximum number of simultaneous transactions.
+set_tx_max 1000
+
+# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/lock/max.html
+#set_lk_max_locks 1000
+#set_lk_max_lockers 1000
+#set_lk_max_objects 1000
--- a/dovecot-example.conf	Sun May 04 17:05:12 2008 +0300
+++ b/dovecot-example.conf	Sun May 04 18:12:28 2008 +0300
@@ -1055,6 +1055,10 @@
   #quota = mysql:/etc/dovecot-dict-quota.conf 
 }
 
+# Path to Berkeley DB's configuration file. See doc/dovecot-db.conf for an
+# example.
+#dict_db_config = 
+
 ##
 ## Plugin settings
 ##
--- a/src/master/dict-process.c	Sun May 04 17:05:12 2008 +0300
+++ b/src/master/dict-process.c	Sun May 04 18:12:28 2008 +0300
@@ -84,6 +84,12 @@
 	child_process_init_env();
 	env_put(t_strconcat("DICT_LISTEN_FROM_FD=", process->path, NULL));
 
+	if (settings_root->defaults->dict_db_config != NULL) {
+		env_put(t_strconcat("DB_CONFIG=",
+				    settings_root->defaults->dict_db_config,
+				    NULL));
+	}
+
 	dicts = array_get(&settings_root->dicts, &count);
 	i_assert((count % 2) == 0);
 	for (i = 0; i < count; i += 2)
--- a/src/master/master-settings-defs.c	Sun May 04 17:05:12 2008 +0300
+++ b/src/master/master-settings-defs.c	Sun May 04 18:12:28 2008 +0300
@@ -124,5 +124,8 @@
 	DEF_STR(pop3_client_workarounds),
 	DEF_STR(pop3_logout_format),
 
+	/* dict */
+	DEF_STR(dict_db_config),
+
 	{ 0, NULL, 0 }
 };
--- a/src/master/master-settings.c	Sun May 04 17:05:12 2008 +0300
+++ b/src/master/master-settings.c	Sun May 04 18:12:28 2008 +0300
@@ -290,6 +290,9 @@
 	MEMBER(pop3_client_workarounds) "",
 	MEMBER(pop3_logout_format) "top=%t/%p, retr=%r/%b, del=%d/%m, size=%s",
 
+	/* dict */
+	MEMBER(dict_db_config) NULL,
+
 	/* .. */
 };
 
--- a/src/master/master-settings.h	Sun May 04 17:05:12 2008 +0300
+++ b/src/master/master-settings.h	Sun May 04 18:12:28 2008 +0300
@@ -136,6 +136,9 @@
 	const char *pop3_client_workarounds;
 	const char *pop3_logout_format;
 
+	/* dict */
+	const char *dict_db_config;
+
 	/* .. */
 	ARRAY_TYPE(listener) listens;
 	ARRAY_TYPE(listener) ssl_listens;