June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int DBENV→set_lg_max(DB_ENV *dbenv, u_int32_t lg_max);
Set the maximum size of a single file in the log, in bytes. Because DB_LSN file offsets are unsigned four-byte values, the set value may not be larger than the maximum unsigned four-byte value. By default, or if the value is set to 0, a size of 10MB is used. The size of the log file must be at least four times the size of the in-memory log buffer (see DBENV→set_lg_bsize).
See “Log File Limits” for more information.
The DBENV→set_lg_max interface may be used only to configure Berkeley DB before the DBENV→open interface is called.
The DBENV→set_lg_max function returns a non-zero error value on failure and 0 on success.
The database environment’s ...