~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/docs/api_c/env_set_lg_bsize.html

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--$Id: env_set_lg_bsize.so,v 10.14 2001/05/15 14:44:09 bostic Exp $-->
 
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
3
<!--All rights reserved.-->
 
4
<html>
 
5
<head>
 
6
<title>Berkeley DB: DB_ENV-&gt;set_lg_bsize</title>
 
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
 
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
 
9
</head>
 
10
<body bgcolor=white>
 
11
<a name="2"><!--meow--></a>
 
12
<table width="100%"><tr valign=top>
 
13
<td>
 
14
<h1>DB_ENV-&gt;set_lg_bsize</h1>
 
15
</td>
 
16
<td align=right>
 
17
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
18
</td></tr></table>
 
19
<hr size=1 noshade>
 
20
<tt>
 
21
<h3><pre>
 
22
#include &lt;db.h&gt;
 
23
<p>
 
24
int
 
25
DB_ENV-&gt;set_lg_bsize(DB_ENV *dbenv, u_int32_t lg_bsize);
 
26
</pre></h3>
 
27
<h1>Description</h1>
 
28
<p>Set the size of the in-memory log buffer, in bytes.  By default, or if
 
29
the value is set to 0, a size of 32K is used.  The size of the log file
 
30
(see <a href="../api_c/env_set_lg_max.html">DB_ENV-&gt;set_lg_max</a>) must be at least four times the size of the
 
31
the in-memory log buffer.
 
32
<p>Log information is stored in-memory until the storage space fills up
 
33
or transaction commit forces the information to be flushed to stable
 
34
storage.  In the presence of long-running transactions or transactions
 
35
producing large amounts of data, larger buffer sizes can increase
 
36
throughput.
 
37
<p>The DB_ENV-&gt;set_lg_bsize interface may be used only to configure Berkeley DB before
 
38
the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> interface is called.
 
39
<p>The DB_ENV-&gt;set_lg_bsize function returns a non-zero error value on failure and 0 on success.
 
40
<p>The database environment's log buffer size may also be set using the environment's
 
41
<b>DB_CONFIG</b> file.  The syntax of the entry in that file is a
 
42
single line with the string "set_lg_bsize", one or more whitespace characters,
 
43
and the size in bytes.  Because the <b>DB_CONFIG</b> file is read when the database
 
44
environment is opened, it will silently overrule configuration done
 
45
before that time.
 
46
<h1>Errors</h1>
 
47
<p>The DB_ENV-&gt;set_lg_bsize function may fail and return a non-zero error for the following conditions:
 
48
<p><dl compact>
 
49
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
 
50
<p>Called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called.
 
51
<p>The size of the log file is less than four times the size of the in-memory
 
52
log buffer.
 
53
</dl>
 
54
<p>The DB_ENV-&gt;set_lg_bsize function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.
 
55
If a catastrophic error has occurred, the DB_ENV-&gt;set_lg_bsize function may fail and return
 
56
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
 
57
in the same way.
 
58
<h1>See Also</h1>
 
59
<a href="../api_c/env_set_lg_bsize.html">DB_ENV-&gt;set_lg_bsize</a>,
 
60
<a href="../api_c/env_set_lg_dir.html">DB_ENV-&gt;set_lg_dir</a>,
 
61
<a href="../api_c/env_set_lg_max.html">DB_ENV-&gt;set_lg_max</a>,
 
62
<a href="../api_c/env_set_lg_regionmax.html">DB_ENV-&gt;set_lg_regionmax</a>,
 
63
<a href="../api_c/log_archive.html">log_archive</a>,
 
64
<a href="../api_c/log_compare.html">log_compare</a>,
 
65
<a href="../api_c/log_file.html">log_file</a>,
 
66
<a href="../api_c/log_flush.html">log_flush</a>,
 
67
<a href="../api_c/log_get.html">log_get</a>,
 
68
<a href="../api_c/log_put.html">log_put</a>,
 
69
<a href="../api_c/log_register.html">log_register</a>,
 
70
<a href="../api_c/log_stat.html">log_stat</a>,
 
71
and
 
72
<a href="../api_c/log_unregister.html">log_unregister</a>.
 
73
</tt>
 
74
<table width="100%"><tr><td><br></td><td align=right>
 
75
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
76
</td></tr></table>
 
77
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
78
</body>
 
79
</html>