Debian Codegraph @

docs/api_reference/C/txncheckpoint.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;txn_checkpoint()</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="txnbegin.html" title="DB_ENV-&gt;txn_begin()" />
12 <link rel="next" href="txnstat.html" title="DB_ENV-&gt;txn_stat()" />
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;txn_checkpoint()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="txnbegin.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="txnstat.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="txncheckpoint"></a>DB_ENV-&gt;txn_checkpoint()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;txn_checkpoint(const DB_ENV *env,
45 u_int32_t kbyte, u_int32_t min, u_int32_t flags); </pre>
46 <p>
47 If there has been any logging activity in the database environment
48 since the last checkpoint, the <code class="methodname">DB_ENV-&gt;txn_checkpoint()</code> method
49 flushes the underlying memory pool, writes a checkpoint record to the
50 log, and then flushes the log.
51 </p>
52 <p>
53 The <code class="methodname">DB_ENV-&gt;txn_checkpoint()</code> method returns a non-zero error value on
54 failure and 0 on success.
55 </p>
56 <p>
57 The <code class="methodname">DB_ENV-&gt;txn_checkpoint()</code> method is the underlying method used by
58 the <a class="link" href="db_checkpoint.html" title="db_checkpoint">db_checkpoint</a>
59 utility. See the <a class="link" href="db_checkpoint.html" title="db_checkpoint">db_checkpoint</a> utility
60 source code for an example of using <code class="methodname">DB_ENV-&gt;txn_checkpoint()</code> in a
61 IEEE/ANSI Std 1003.1 (POSIX) environment.
62 </p>
63 <div class="sect2" lang="en" xml:lang="en">
64 <div class="titlepage">
65 <div>
66 <div>
67 <h3 class="title"><a id="idp54814936"></a>Parameters</h3>
68 </div>
69 </div>
70 </div>
71 <div class="sect3" lang="en" xml:lang="en">
72 <div class="titlepage">
73 <div>
74 <div>
75 <h4 class="title"><a id="idp54809240"></a>kbyte</h4>
76 </div>
77 </div>
78 </div>
79 <p>
80 If the <span class="bold"><strong>kbyte</strong></span> parameter is non-zero, a
81 checkpoint will be done if more than <span class="bold"><strong>kbyte</strong></span> kilobytes of log data have been written
82 since the last checkpoint.
83 </p>
84 </div>
85 <div class="sect3" lang="en" xml:lang="en">
86 <div class="titlepage">
87 <div>
88 <div>
89 <h4 class="title"><a id="idp54834712"></a>min</h4>
90 </div>
91 </div>
92 </div>
93 <p>
94 If the <span class="bold"><strong>min</strong></span> parameter is non-zero, a
95 checkpoint will be done if more than <span class="bold"><strong>min</strong></span> minutes have passed since the last
96 checkpoint.
97 </p>
98 </div>
99 <div class="sect3" lang="en" xml:lang="en">
100 <div class="titlepage">
101 <div>
102 <div>
103 <h4 class="title"><a id="idp54809648"></a>flags</h4>
104 </div>
105 </div>
106 </div>
107 <p>
108 The <span class="bold"><strong>flags</strong></span> parameter must be set to 0
109 or the following value:
110 </p>
111 <div class="itemizedlist">
112 <ul type="disc">
113 <li>
114 <p>
115 <code class="literal">DB_FORCE</code>
116 </p>
117 <p>
118 Force a checkpoint record, even if there has been no activity since
119 the last checkpoint.
120 </p>
121 </li>
122 </ul>
123 </div>
124 </div>
125 </div>
126 <div class="sect2" lang="en" xml:lang="en">
127 <div class="titlepage">
128 <div>
129 <div>
130 <h3 class="title"><a id="idp54862104"></a>Errors</h3>
131 </div>
132 </div>
133 </div>
134 <p>
135 The <code class="methodname">DB_ENV-&gt;txn_checkpoint()</code> <span>
136 <span>
137 method may fail and return one of the following non-zero errors:
138 </span>
139
140 </span>
141 </p>
142 <div class="sect3" lang="en" xml:lang="en">
143 <div class="titlepage">
144 <div>
145 <div>
146 <h4 class="title"><a id="idp54867352"></a>EINVAL</h4>
147 </div>
148 </div>
149 </div>
150 <p>
151 An invalid flag value or parameter was specified.
152 </p>
153 </div>
154 </div>
155 <div class="sect2" lang="en" xml:lang="en">
156 <div class="titlepage">
157 <div>
158 <div>
159 <h3 class="title"><a id="idp54863280"></a>Class</h3>
160 </div>
161 </div>
162 </div>
163 <p>
164 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>, <a class="link" href="txn.html" title="Chapter 12.  The DB_TXN Handle">DB_TXN</a>
165 </p>
166 </div>
167 <div class="sect2" lang="en" xml:lang="en">
168 <div class="titlepage">
169 <div>
170 <div>
171 <h3 class="title"><a id="idp54868432"></a>See Also</h3>
172 </div>
173 </div>
174 </div>
175 <p>
176 <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a>
177 </p>
178 </div>
179 </div>
180 <div class="navfooter">
181 <hr />
182 <table width="100%" summary="Navigation footer">
183 <tr>
184 <td width="40%" align="left"><a accesskey="p" href="txnbegin.html">Prev</a> </td>
185 <td width="20%" align="center">
186 <a accesskey="u" href="txn.html">Up</a>
187 </td>
188 <td width="40%" align="right"> <a accesskey="n" href="txnstat.html">Next</a></td>
189 </tr>
190 <tr>
191 <td width="40%" align="left" valign="top">DB_ENV-&gt;txn_begin() </td>
192 <td width="20%" align="center">
193 <a accesskey="h" href="index.html">Home</a>
194 </td>
195 <td width="40%" align="right" valign="top"> DB_ENV-&gt;txn_stat()</td>
196 </tr>
197 </table>
198 </div>
199 </body>
200 </html>