1<!--$Id: env_set_lg_regionmax.so,v 10.23 2006/08/30 10:04:48 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: DB_ENV->set_lg_regionmax</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>DB_ENV->set_lg_regionmax</b> 14</td> 15<td align=right> 16<a href="/api_c/api_core.html"><img src="/images/api.gif" alt="API"></a> 17<a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db.h> 23<p> 24int 25DB_ENV->set_lg_regionmax(DB_ENV *dbenv, u_int32_t lg_regionmax); 26<p> 27int 28DB_ENV->get_lg_regionmax(DB_ENV *dbenv, u_int32_t *lg_regionmaxp); 29</pre></b> 30<hr size=1 noshade> 31<b>Description: DB_ENV->set_lg_regionmax</b> 32<p>Set the size of the underlying logging area of the Berkeley DB environment, 33in bytes. By default, or if the value is set to 0, the default size is 34approximately 60KB. The log region is used to store filenames, and so 35may need to be increased in size if a large number of files will be 36opened and registered with the specified Berkeley DB environment's log 37manager.</p> 38<p>The database environment's log region size may also be configured using the 39environment's <a href="/ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that 40file is a single line with the string "set_lg_regionmax", one or more whitespace 41characters, and the size in bytes. 42Because the <a href="/ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment 43is opened, it will silently overrule configuration done before that 44time.</p> 45<p>The DB_ENV->set_lg_regionmax method configures a database environment, not only operations 46performed using the specified <a href="/api_c/env_class.html">DB_ENV</a> handle.</p> 47<p>The DB_ENV->set_lg_regionmax method may not be called after the <a href="/api_c/env_open.html">DB_ENV->open</a> method is 48called. 49If the database environment already exists when 50<a href="/api_c/env_open.html">DB_ENV->open</a> is called, the information specified to DB_ENV->set_lg_regionmax 51will be ignored. 52</p> 53<p>The DB_ENV->set_lg_regionmax method 54returns a non-zero error value on failure 55and 0 on success. 56</p> 57<b>Parameters</b> <br> 58 <b>lg_regionmax</b><ul compact><li>The <b>lg_regionmax</b> parameter is the size of the logging area in 59the Berkeley DB environment, in bytes.</ul> 60<br> 61<br><b>Errors</b> 62<p>The DB_ENV->set_lg_regionmax method 63may fail and return one of the following non-zero errors:</p> 64<br> 65<b>EINVAL</b><ul compact><li>If the method was called after <a href="/api_c/env_open.html">DB_ENV->open</a> was called; or if an 66invalid flag value or parameter was specified.</ul> 67<br> 68<hr size=1 noshade> 69<b>Description: DB_ENV->get_lg_regionmax</b> 70<p>The DB_ENV->get_lg_regionmax method returns the size of the underlying logging subsystem region.</p> 71<p>The DB_ENV->get_lg_regionmax method may be called at any time during the life of the 72application.</p> 73<p>The DB_ENV->get_lg_regionmax method 74returns a non-zero error value on failure 75and 0 on success. 76</p> 77<b>Parameters</b> <br> 78 <b>lg_regionmaxp</b><ul compact><li>The DB_ENV->get_lg_regionmax method returns the 79size of the underlying logging subsystem region in <b>lg_regionmaxp</b>.</ul> 80<br> 81<hr size=1 noshade> 82<br><b>Class</b> 83<a href="/api_c/env_class.html">DB_ENV</a>, <a href="/api_c/logc_class.html">DB_LOGC</a>, <a href="/api_c/lsn_class.html">DB_LSN</a> 84<br><b>See Also</b> 85<a href="/api_c/log_list.html">Logging Subsystem and Related Methods</a> 86</tt> 87<table width="100%"><tr><td><br></td><td align=right> 88<a href="/api_c/api_core.html"><img src="/images/api.gif" alt="API"></a><a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a> 89</td></tr></table> 90<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 91</body> 92</html> 93