Debian Codegraph @

docs/api_reference/C/envset_tx_max.html

raw symbols SCIP
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_tx_max()</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="txn.html" title="Chapter 12.  The DB_TXN Handle" />
11 <link rel="prev" href="envget_tx_timestamp.html" title="DB_ENV-&gt;get_tx_timestamp()" />
12 <link rel="next" href="envset_tx_timestamp.html" title="DB_ENV-&gt;set_tx_timestamp()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DB_ENV-&gt;set_tx_max()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envget_tx_timestamp.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 12. 
26 The DB_TXN Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_tx_timestamp.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="envset_tx_max"></a>DB_ENV-&gt;set_tx_max()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;set_tx_max(DB_ENV *dbenv, u_int32_t max); </pre>
45 <p>
46 Configure the Berkeley DB database environment to support at least
47 <span class="bold"><strong>max</strong></span> active transactions. This value
48 bounds the size of the memory allocated for transactions. Child
49 transactions are counted as active until they either commit or abort.
50 </p>
51 <p>
52 Transactions that update multiversion databases are not freed until
53 the last page version that the transaction created is flushed from
54 cache. This means that applications using multi-version concurrency
55 control may need a transaction for each page in cache, in the extreme
56 case.
57 </p>
58 <p>
59 When all of the memory available in the database environment for
60 transactions is in use, calls to
61 <a class="xref" href="txnbegin.html" title="DB_ENV-&gt;txn_begin()">DB_ENV-&gt;txn_begin()</a> will fail
62 (until some active transactions complete). If
63 <code class="classname">DB_ENV-&gt;set_tx_max()</code> is never called,
64 the database environment is configured to support at least 100
65 active transactions.
66 </p>
67 <p>
68 The database environment's number of active transactions may also
69 be configured using the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file. The syntax
70 of the entry in that file is a single line with the string
71 "set_tx_max", one or more whitespace characters, and the number of
72 transactions. Because the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is read when the
73 database environment is opened, it will silently overrule
74 configuration done before that time.
75 </p>
76 <p>
77 The <code class="methodname">DB_ENV-&gt;set_tx_max()</code> method configures
78 a database environment, not only operations performed using the
79 specified <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a> handle.
80 </p>
81 <p>
82 The <code class="methodname">DB_ENV-&gt;set_tx_max()</code> method may not be called after the
83 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> method is called.
84 If the database environment already exists when
85 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> is called, the
86 information specified to <code class="methodname">DB_ENV-&gt;set_tx_max()</code> will be ignored.
87 </p>
88 <p>
89 The <code class="methodname">DB_ENV-&gt;set_tx_max()</code> <span>
90 <span>
91 method returns a non-zero error value on failure and 0 on success.
92 </span>
93
94 </span>
95 </p>
96 <div class="sect2" lang="en" xml:lang="en">
97 <div class="titlepage">
98 <div>
99 <div>
100 <h3 class="title"><a id="idp54766712"></a>Parameters</h3>
101 </div>
102 </div>
103 </div>
104 <div class="sect3" lang="en" xml:lang="en">
105 <div class="titlepage">
106 <div>
107 <div>
108 <h4 class="title"><a id="idp54766064"></a>max</h4>
109 </div>
110 </div>
111 </div>
112 <p>
113 The <span class="bold"><strong>max</strong></span> parameter configures the
114 minimum number of simultaneously active transactions supported by
115 Berkeley DB database environment.
116 </p>
117 </div>
118 </div>
119 <div class="sect2" lang="en" xml:lang="en">
120 <div class="titlepage">
121 <div>
122 <div>
123 <h3 class="title"><a id="idp54769704"></a>Errors</h3>
124 </div>
125 </div>
126 </div>
127 <p>
128 The <code class="methodname">DB_ENV-&gt;set_tx_max()</code> <span>
129 <span>
130 method may fail and return one of the following non-zero errors:
131 </span>
132
133 </span>
134 </p>
135 <div class="sect3" lang="en" xml:lang="en">
136 <div class="titlepage">
137 <div>
138 <div>
139 <h4 class="title"><a id="idp54777456"></a>EINVAL</h4>
140 </div>
141 </div>
142 </div>
143 <p>
144 If the method was called after <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>
145 was called; or if an invalid flag value or parameter was specified.
146 </p>
147 </div>
148 </div>
149 <div class="sect2" lang="en" xml:lang="en">
150 <div class="titlepage">
151 <div>
152 <div>
153 <h3 class="title"><a id="idp54765848"></a>Class</h3>
154 </div>
155 </div>
156 </div>
157 <p>
158 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>,
159 <a class="link" href="txn.html" title="Chapter 12.  The DB_TXN Handle">DB_TXN</a>
160 </p>
161 </div>
162 <div class="sect2" lang="en" xml:lang="en">
163 <div class="titlepage">
164 <div>
165 <div>
166 <h3 class="title"><a id="idp54779688"></a>See Also</h3>
167 </div>
168 </div>
169 </div>
170 <p>
171 <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a>
172 </p>
173 </div>
174 </div>
175 <div class="navfooter">
176 <hr />
177 <table width="100%" summary="Navigation footer">
178 <tr>
179 <td width="40%" align="left"><a accesskey="p" href="envget_tx_timestamp.html">Prev</a> </td>
180 <td width="20%" align="center">
181 <a accesskey="u" href="txn.html">Up</a>
182 </td>
183 <td width="40%" align="right"> <a accesskey="n" href="envset_tx_timestamp.html">Next</a></td>
184 </tr>
185 <tr>
186 <td width="40%" align="left" valign="top">DB_ENV-&gt;get_tx_timestamp() </td>
187 <td width="20%" align="center">
188 <a accesskey="h" href="index.html">Home</a>
189 </td>
190 <td width="40%" align="right" valign="top"> DB_ENV-&gt;set_tx_timestamp()</td>
191 </tr>
192 </table>
193 </div>
194 </body>
195 </html>