DB_ENV->log_set_config |
#include <db.h>int DB_ENV->log_set_config(DB_ENV *dbenv, u_int32_t flags, int onoff);
int DB_ENV->log_get_config(DB_ENV *dbenv, u_int32_t which, int *onoffp);
The DB_ENV->log_set_config method configures the Berkeley DB logging subsystem.
The DB_ENV->log_set_config method configures a database environment, not only operations performed using the specified DB_ENV handle.
The DB_ENV->log_set_config method may be called at any time during the life of the application.
The DB_ENV->log_set_config method returns a non-zero error value on failure and 0 on success.
ParametersCalling DB_ENV->log_set_config with the DB_LOG_DIRECT flag only affects the specified DB_ENV handle (and any other Berkeley DB handles opened within the scope of that handle). For consistent behavior across the environment, all DB_ENV handles opened in the environment must either set the DB_LOG_DIRECT flag or the flag should be specified in the DB_CONFIG configuration file.
The DB_LOG_DIRECT flag may be used to configure Berkeley DB at any time during the life of the application.
Calling DB_ENV->log_set_config with the DB_LOG_DSYNC flag only affects the specified DB_ENV handle (and any other Berkeley DB handles opened within the scope of that handle). For consistent behavior across the environment, all DB_ENV handles opened in the environment must either set the DB_LOG_DSYNC flag or the flag should be specified in the DB_CONFIG configuration file.
The DB_LOG_DSYNC flag may be used to configure Berkeley DB at any time during the life of the application.
Automatic log file removal is likely to make catastrophic recovery impossible.
Replication applications will rarely want to configure automatic log file removal as it increases the likelihood a master will be unable to satisfy a client's request for a recent log record.
Calling DB_ENV->log_set_config with the DB_LOG_AUTO_REMOVE flag affects the database environment, including all threads of control accessing the database environment.
The DB_LOG_AUTO_REMOVE flag may be used to configure Berkeley DB at any time during the life of the application.
When in-memory logs are configured and no more log buffer space is available, Berkeley DB methods may return an additional error value, DB_LOG_BUFFER_FULL. When choosing log buffer and file sizes for in-memory logs, applications should ensure the in-memory log buffer size is large enough that no transaction will ever span the entire buffer, and avoid a state where the in-memory buffer is full and no space can be freed because a transaction that started in the first log "file" is still active.
Calling DB_ENV->log_set_config with the DB_LOG_IN_MEMORY flag affects the database environment, including all threads of control accessing the database environment.
The DB_LOG_IN_MEMORY flag may be used to configure Berkeley DB only before the DB_ENV->open method is called.
Calling DB_ENV->log_set_config with the DB_LOG_ZERO flag affects the database environment, including all threads of control accessing the database environment.
The DB_LOG_ZERO flag may be used to configure Berkeley DB only before the DB_ENV->open method is called.
The DB_ENV->log_set_config method may fail and return one of the following non-zero errors:
The DB_ENV->log_get_config method returns whether the specified which parameter is currently set or not.
The DB_ENV->log_get_config method may be called at any time during the life of the application.
The DB_ENV->log_get_config method returns a non-zero error value on failure and 0 on success.
ParametersCopyright (c) 1996,2008 Oracle. All rights reserved.