• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/api_reference/C/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>DB_ENV-&gt;set_lg_regionmax()</title>
7    <link rel="stylesheet" href="apiReference.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10    <link rel="up" href="lsn.html" title="Chapter��7.�� The DB_LSN Handle" />
11    <link rel="prev" href="envset_lg_max.html" title="DB_ENV-&gt;set_lg_max()" />
12    <link rel="next" href="logc.html" title="The DB_LOGC Handle" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DB_ENV-&gt;set_lg_regionmax()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="envset_lg_max.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��7.��
23                The DB_LSN Handle
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="logc.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="envset_lg_regionmax"></a>DB_ENV-&gt;set_lg_regionmax()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;set_lg_regionmax(DB_ENV *dbenv, u_int32_t lg_regionmax);  </pre>
42      <p>
43         Set the size of the underlying logging area of the Berkeley DB
44         environment, in bytes.  By default, or if the value is set to 0, the
45         minimum region size is used, approximately 128KB.  The log region is
46         used to store filenames, and so may need to be increased in size if a
47         large number of files will be opened and registered with the specified
48         Berkeley DB environment's log manager.
49    </p>
50      <p>
51         The database environment's log region size may also be configured
52         using the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file.  The
53         syntax of the entry in that file is a single line with the string
54         "set_lg_regionmax", one or more whitespace characters, and the size in
55         bytes. Because the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is
56         read when the database environment is opened, it will silently
57         overrule configuration done before that time.
58    </p>
59      <p>
60         The <code class="methodname">DB_ENV-&gt;set_lg_regionmax()</code> method configures a database
61         environment, not only operations performed using the specified 
62         <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  handle.
63    </p>
64      <p>
65         The <code class="methodname">DB_ENV-&gt;set_lg_regionmax()</code> method may not be called after the
66         <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>  method is
67         called. If the database environment already exists when 
68         <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>  is called, the
69         information specified to <code class="methodname">DB_ENV-&gt;set_lg_regionmax()</code> will be ignored.
70    </p>
71      <p>
72         The <code class="methodname">DB_ENV-&gt;set_lg_regionmax()</code> <span>
73            <span>
74                  method returns a non-zero error value on failure and 0 on success.
75            </span>
76            
77        </span>
78    </p>
79      <div class="sect2" lang="en" xml:lang="en">
80        <div class="titlepage">
81          <div>
82            <div>
83              <h3 class="title"><a id="id1684365"></a>Parameters</h3>
84            </div>
85          </div>
86        </div>
87        <div class="sect3" lang="en" xml:lang="en">
88          <div class="titlepage">
89            <div>
90              <div>
91                <h4 class="title"><a id="id1684355"></a>lg_regionmax</h4>
92              </div>
93            </div>
94          </div>
95          <p>
96                          The <span class="bold"><strong>lg_regionmax</strong></span> parameter is the
97                          size of the logging area in the Berkeley DB environment, in bytes.
98                     </p>
99        </div>
100      </div>
101      <div class="sect2" lang="en" xml:lang="en">
102        <div class="titlepage">
103          <div>
104            <div>
105              <h3 class="title"><a id="id1684517"></a>Errors</h3>
106            </div>
107          </div>
108        </div>
109        <p>
110                         The <code class="methodname">DB_ENV-&gt;set_lg_regionmax()</code> <span>
111            <span>
112                 method may fail and return one of the following non-zero errors:
113            </span>
114            
115        </span>
116                    </p>
117        <div class="sect3" lang="en" xml:lang="en">
118          <div class="titlepage">
119            <div>
120              <div>
121                <h4 class="title"><a id="id1684227"></a>EINVAL</h4>
122              </div>
123            </div>
124          </div>
125          <p>
126                If the method was called after <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> 
127                was called; or if an invalid flag value or parameter was specified.
128            </p>
129        </div>
130      </div>
131      <div class="sect2" lang="en" xml:lang="en">
132        <div class="titlepage">
133          <div>
134            <div>
135              <h3 class="title"><a id="id1684425"></a>Class</h3>
136            </div>
137          </div>
138        </div>
139        <p>
140                    <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>, 
141                    <a class="link" href="logc.html" title="The DB_LOGC Handle">DB_LOGC</a>, 
142                    <a class="link" href="lsn.html" title="Chapter��7.�� The DB_LSN Handle">DB_LSN</a> 
143            </p>
144      </div>
145      <div class="sect2" lang="en" xml:lang="en">
146        <div class="titlepage">
147          <div>
148            <div>
149              <h3 class="title"><a id="id1684310"></a>See Also</h3>
150            </div>
151          </div>
152        </div>
153        <p>
154                     <a class="xref" href="lsn.html#loglist" title="Logging Subsystem and Related Methods">Logging Subsystem and Related Methods</a> 
155                </p>
156      </div>
157    </div>
158    <div class="navfooter">
159      <hr />
160      <table width="100%" summary="Navigation footer">
161        <tr>
162          <td width="40%" align="left"><a accesskey="p" href="envset_lg_max.html">Prev</a>��</td>
163          <td width="20%" align="center">
164            <a accesskey="u" href="lsn.html">Up</a>
165          </td>
166          <td width="40%" align="right">��<a accesskey="n" href="logc.html">Next</a></td>
167        </tr>
168        <tr>
169          <td width="40%" align="left" valign="top">DB_ENV-&gt;set_lg_max()��</td>
170          <td width="20%" align="center">
171            <a accesskey="h" href="index.html">Home</a>
172          </td>
173          <td width="40%" align="right" valign="top">��
174                The DB_LOGC Handle
175        </td>
176        </tr>
177      </table>
178    </div>
179  </body>
180</html>
181