~ubuntu-branches/ubuntu/precise/rpm/precise-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-06-25 18:57:20 UTC
  • mfrom: (1.1.5 upstream) (4.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090625185720-617sjskgtgmf09vf
Tags: 4.7.0-7ubuntu1
* Merge from debian unstable, remaining changes:
  - change build depends from libdwarf-dev -> libdw-dev
    (libdwarf-dev is in universe)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id: env_set_lg_max.so,v 10.45 2004/09/28 15:04:21 bostic Exp $-->
2
 
<!--Copyright 1997-2004 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB: DB_ENV-&gt;set_lg_max</title>
8
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
10
 
</head>
11
 
<body bgcolor=white>
12
 
<table width="100%"><tr valign=top>
13
 
<td>
14
 
<h3>DB_ENV-&gt;set_lg_max</h3>
15
 
</td>
16
 
<td align=right>
17
 
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
18
 
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
19
 
</tr></table>
20
 
<hr size=1 noshade>
21
 
<tt>
22
 
<h3><pre>
23
 
#include &lt;db.h&gt;
24
 
<p>
25
 
int
26
 
DB_ENV-&gt;set_lg_max(DB_ENV *dbenv, u_int32_t lg_max);
27
 
<p>
28
 
int
29
 
DB_ENV-&gt;get_lg_max(DB_ENV *dbenv, u_int32_t *lg_maxp);
30
 
</pre></h3>
31
 
<hr size=1 noshade>
32
 
<h3>Description: DB_ENV-&gt;set_lg_max</h3>
33
 
<p>Set the maximum size of a single file in the log, in bytes.  Because
34
 
<a href="../api_c/lsn_class.html">DB_LSN</a> file offsets are unsigned four-byte values, the set
35
 
value may not be larger than the maximum unsigned four-byte value.</p>
36
 
<p>When the logging subsystem is configured for on-disk logging, the
37
 
default size of a log file is 10MB.</p>
38
 
<p>When the logging subsystem is configured for in-memory logging, the
39
 
default size of a log file is 256KB.  In addition, the configured log
40
 
buffer size must be larger than the log file size.  (The logging
41
 
subsystem divides memory configured for in-memory log records into
42
 
"files", as database environments configured for in-memory log records
43
 
may exchange log records with other members of a replication group, and
44
 
those members may be configured to store log records on-disk.)  When
45
 
choosing log buffer and file sizes for in-memory logs, applications
46
 
should ensure the in-memory log buffer size is large enough that no
47
 
transaction will ever span the entire buffer, and avoid a state where
48
 
the in-memory buffer is full and no space can be freed because a
49
 
transaction that started in the first log "file" is still active.</p>
50
 
<p>See <a href="../ref/log/limits.html">Log File Limits</a> for more
51
 
information.</p>
52
 
<p>The database environment's log file size may also be set using the environment's
53
 
<b>DB_CONFIG</b> file.  The syntax of the entry in that file is a
54
 
single line with the string "set_lg_max", one or more whitespace characters,
55
 
and the size in bytes.
56
 
Because the <b>DB_CONFIG</b> file is read when the database
57
 
environment is opened, it will silently overrule configuration done
58
 
before that time.</p>
59
 
<p>The DB_ENV-&gt;set_lg_max method configures a database environment, not only operations
60
 
performed using the specified <a href="../api_c/env_class.html">DB_ENV</a> handle.</p>
61
 
<p>The DB_ENV-&gt;set_lg_max method may be called at any time during the life of the
62
 
application.</p>
63
 
If no size is specified by the application, the size last specified for
64
 
the database region will be used, or if no database region previously
65
 
existed, the default will be used.
66
 
<p>The DB_ENV-&gt;set_lg_max method
67
 
returns a non-zero error value on failure
68
 
and 0 on success.
69
 
</p>
70
 
<h3>Parameters</h3>
71
 
<dl compact>
72
 
<dt><b>lg_max</b><dd>The <b>lg_max</b> parameter is the size of a single log file, in bytes.
73
 
</dl>
74
 
<h3>Errors</h3>
75
 
<p>The DB_ENV-&gt;set_lg_max method
76
 
may fail and return one of the following non-zero errors:</p>
77
 
<dl compact>
78
 
<dt>EINVAL<dd>If the method was called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called;
79
 
the size of the log file is less than four times the size of the in-memory
80
 
log buffer;
81
 
The specified log file size was too large; or if an
82
 
invalid flag value or parameter was specified.
83
 
</dl>
84
 
<hr size=1 noshade>
85
 
<h3>Description: DB_ENV-&gt;get_lg_max</h3>
86
 
<p>The DB_ENV-&gt;get_lg_max method returns the maximum log file size.</p>
87
 
<p>The DB_ENV-&gt;get_lg_max method may be called at any time during the life of the
88
 
application.</p>
89
 
<p>The DB_ENV-&gt;get_lg_max method
90
 
returns a non-zero error value on failure
91
 
and 0 on success.
92
 
</p>
93
 
<h3>Parameters</h3>
94
 
<dl compact>
95
 
<dt><b>lg_maxp</b><dd>The DB_ENV-&gt;get_lg_max method returns  the
96
 
maximum log file size in <b>lg_maxp</b>.
97
 
</dl>
98
 
<hr size=1 noshade>
99
 
<h3>Class</h3>
100
 
<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>
101
 
<h3>See Also</h3>
102
 
<a href="../api_c/log_list.html">Logging Subsystem and Related Methods</a>
103
 
</tt>
104
 
<table width="100%"><tr><td><br></td><td align=right>
105
 
<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>
106
 
</td></tr></table>
107
 
<p><font size=1><a href="../sleepycat/legal.html">Copyright (c) 1996-2004</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font>
108
 
</body>
109
 
</html>