<!--$Id: config.so,v 10.19 2002/07/22 05:11:58 bostic Exp $--> <!--Copyright (c) 1997,2007 Oracle. All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB Reference Guide: Configuring transactions</title> <meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> <meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> </head> <body bgcolor=white> <a name="2"><!--meow--></a> <table width="100%"><tr valign=top> <td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Transaction Subsystem</dl></h3></td> <td align=right><a href="../txn/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../txn/limits.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p> <h3 align=center>Configuring transactions</h3> <p>The application may change the number of simultaneous outstanding transactions supported by the Berkeley DB environment by calling the <a href="../../api_c/env_set_tx_max.html">DB_ENV->set_tx_max</a> method. This will also set the size of the underlying transaction subsystem's region. When the number of outstanding transactions is reached, additional calls to <a href="../../api_c/txn_begin.html">DB_ENV->txn_begin</a> will fail until some active transactions complete.</p> <p>There is an additional parameter used in configuring transactions; the <a href="../../api_c/env_set_flags.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a> flag. Setting the <a href="../../api_c/env_set_flags.html#DB_TXN_NOSYNC">DB_TXN_NOSYNC</a> flag to <a href="../../api_c/env_set_flags.html">DB_ENV->set_flags</a> when opening a transaction region changes the behavior of transactions to not write or synchronously flush the log during transaction commit.</p> <p>This change may significantly increase application transactional throughput. However, it means that although transactions will continue to exhibit the ACI (atomicity, consistency, and isolation) properties, they will not have D (durability). Database integrity will be maintained, but it is possible that some number of the most recently committed transactions may be undone during recovery instead of being redone.</p> <table width="100%"><tr><td><br></td><td align=right><a href="../txn/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../txn/limits.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p><font size=1>Copyright (c) 1996,2007 Oracle. All rights reserved.</font> </body> </html>