Import BSDDB 4.7.25 (as of svn r89086)
This commit is contained in:
21
docs_src/log/Makefile
Normal file
21
docs_src/log/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# $Id: Makefile,v 1.7 2008/01/23 21:15:44 sarette Exp $
|
||||
|
||||
COMMON= env_log_set_config.html \
|
||||
env_set_lg_bsize.html \
|
||||
env_set_lg_dir.html \
|
||||
env_set_lg_max.html \
|
||||
env_set_lg_mode.html \
|
||||
env_set_lg_regionmax.html \
|
||||
log_archive.html \
|
||||
log_compare.html \
|
||||
log_cursor.html \
|
||||
log_file.html \
|
||||
log_flush.html \
|
||||
log_list.html \
|
||||
log_printf.html \
|
||||
log_put.html \
|
||||
log_stat.html \
|
||||
logc_class.html \
|
||||
logc_close.html \
|
||||
logc_get.html \
|
||||
lsn_class.html
|
||||
131
docs_src/log/env_log_set_config.so
Normal file
131
docs_src/log/env_log_set_config.so
Normal file
@@ -0,0 +1,131 @@
|
||||
m4_comment([$Id])
|
||||
|
||||
define(M4PAGELOCAL,
|
||||
[dbenv_log_set_config, dbenv_log_get_config,
|
||||
DB_LOG_DIRECT, DB_LOG_DSYNC, DB_LOG_AUTO_REMOVE,
|
||||
DB_LOG_BUFFER_FULL, DB_LOG_IN_MEMORY, DB_LOG_ZERO])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(dbenv_log_set_config),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_set_config(DB_ENV *dbenv, u_int32_t flags, int onoff);
|
||||
m4_blank
|
||||
int
|
||||
DB_ENV-__GT__log_get_config(DB_ENV *dbenv, u_int32_t which, int *onoffp);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_set_config(u_int32_t flags, int onoff);
|
||||
m4_blank
|
||||
int
|
||||
DbEnv::log_get_config(u_int32_t which, int *onoffp)
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(dbenv_log_set_config) configures the m4_db logging
|
||||
subsystem.])
|
||||
|
||||
m4_scope_env(dbenv_log_set_config)
|
||||
m4_when_any(dbenv_log_set_config)
|
||||
m4_return(dbenv_log_set_config, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_must
|
||||
|
||||
m4_tagbegin
|
||||
|
||||
m4_idefz([turn off system @buffering for log files])
|
||||
m4_tag(m4_idef(DB_LOG_DIRECT), [dnl
|
||||
Turn off system buffering of m4_db log files to avoid double caching.
|
||||
m4_scope_dbenv_flags(dbenv_log_set_config, DB_LOG_DIRECT, config)
|
||||
m4_env_flags_any(DB_LOG_DIRECT)])
|
||||
|
||||
m4_idefz([turn off system @buffering for log files])
|
||||
m4_tag(m4_idef(DB_LOG_DSYNC), [dnl
|
||||
Configure m4_db to flush log writes to the backing disk before returning
|
||||
from the write system call, rather than flushing log writes explicitly
|
||||
in a separate system call, as necessary. This is only available on some
|
||||
systems (for example, systems supporting the m4_posix1_name standard
|
||||
O_DSYNC flag, or systems supporting the Windows FILE_FLAG_WRITE_THROUGH
|
||||
flag). This flag may result in inaccurate file modification times and
|
||||
other file-level information for m4_db log files. This flag may offer
|
||||
a performance increase on some systems and a performance decrease on
|
||||
others.
|
||||
m4_scope_dbenv_flags(dbenv_log_set_config, DB_LOG_DSYNC, config)
|
||||
m4_env_flags_any(DB_LOG_DSYNC)])
|
||||
|
||||
m4_idefz([automatic @log file removal])
|
||||
m4_tag(m4_idef(DB_LOG_AUTO_REMOVE), [dnl
|
||||
If set, m4_db will automatically remove log files that are no longer
|
||||
needed.
|
||||
m4_p([dnl
|
||||
Automatic log file removal is likely to make catastrophic recovery
|
||||
impossible.])
|
||||
m4_p([dnl
|
||||
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.])
|
||||
m4_scope_env_flags(dbenv_log_set_config, DB_LOG_AUTO_REMOVE)
|
||||
m4_env_flags_any(DB_LOG_AUTO_REMOVE)])
|
||||
|
||||
m4_idefz([in memory @logs])
|
||||
m4_tag(m4_idef(DB_LOG_IN_MEMORY), [dnl
|
||||
If set, maintain transaction logs in memory rather than on disk. This
|
||||
means that transactions exhibit the ACI (atomicity, consistency, and
|
||||
isolation) properties, but not D (durability); that is, database
|
||||
integrity will be maintained, but if the application or system fails,
|
||||
integrity will not persist. All database files must be verified and/or
|
||||
restored from a replication group master or archival backup after
|
||||
application or system failure.
|
||||
m4_p([dnl
|
||||
When in-memory logs are configured and no more log buffer space is
|
||||
available, m4_db methods may return an additional error value,
|
||||
m4_idef(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.])
|
||||
m4_scope_env_flags(dbenv_log_set_config, DB_LOG_IN_MEMORY, config)
|
||||
m4_env_flags_open(DB_LOG_IN_MEMORY, before)])
|
||||
|
||||
m4_idefz([pre-zero @log files])
|
||||
m4_tag(m4_idef(DB_LOG_ZERO), [dnl
|
||||
If set, zero all pages of a log file when that log file is created. This
|
||||
has shown to provide greater transaction throughput in some environments.
|
||||
The log file will be zeroed by the thread which needs to re-create the new log
|
||||
file. Other threads may not write to the log file while this is happening.
|
||||
m4_scope_env_flags(dbenv_log_set_config, DB_LOG_ZERO, config)
|
||||
m4_env_flags_open(DB_LOG_ZERO, before)])
|
||||
m4_tagend])
|
||||
|
||||
m4_param(onoff, [dnl
|
||||
If the m4_arg(onoff) parameter is zero, the specified flags are cleared;
|
||||
otherwise they are set.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(dbenv_log_set_config, einval)
|
||||
|
||||
m4_pf_description(m4_ref(dbenv_log_get_config))
|
||||
m4_p([dnl
|
||||
The m4_refT(dbenv_log_get_config) returns whether the specified m4_arg(which)
|
||||
parameter is currently set or not.])
|
||||
|
||||
m4_when_any(dbenv_log_get_config)
|
||||
|
||||
m4_return(dbenv_log_get_config, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(which, [dnl
|
||||
The m4_arg(which) parameter is the message value for which configuration
|
||||
is being checked.])
|
||||
m4_param_co(onoffp, [dnl
|
||||
configuration of the specified m4_arg(which) parameter],, [dnl
|
||||
If the returned m4_arg(onoff) value is zero, the parameter is off;
|
||||
otherwise on.])
|
||||
m4_paramend
|
||||
|
||||
m4_seealso(DbEnv)
|
||||
m4_page_footer
|
||||
68
docs_src/log/env_set_lg_bsize.so
Normal file
68
docs_src/log/env_set_lg_bsize.so
Normal file
@@ -0,0 +1,68 @@
|
||||
m4_comment([$Id: env_set_lg_bsize.so,v 10.36 2006/08/30 10:04:48 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [dbenv_set_lg_bsize, dbenv_get_lg_bsize])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(dbenv_set_lg_bsize),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__set_lg_bsize(DB_ENV *dbenv, u_int32_t lg_bsize);
|
||||
m4_blank
|
||||
int
|
||||
DB_ENV-__GT__get_lg_bsize(DB_ENV *dbenv, u_int32_t *lg_bsizep);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::set_lg_bsize(u_int32_t lg_bsize);
|
||||
m4_blank
|
||||
int
|
||||
DbEnv::get_lg_bsize(u_int32_t *lg_bsizep);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Set the size of the in-memory log buffer, in bytes.])
|
||||
|
||||
m4_p([dnl
|
||||
When the logging subsystem is configured for on-disk logging, the
|
||||
default size of the in-memory log buffer is approximately 32KB. Log
|
||||
information is stored in-memory until the storage space fills up or
|
||||
transaction commit forces the information to be flushed to stable
|
||||
storage. In the presence of long-running transactions or transactions
|
||||
producing large amounts of data, larger buffer sizes can increase
|
||||
throughput.])
|
||||
|
||||
m4_p([dnl
|
||||
When the logging subsystem is configured for in-memory logging, the
|
||||
default size of the in-memory log buffer is 1MB. Log information is
|
||||
stored in-memory until the storage space fills up or transaction abort
|
||||
or commit frees up the memory for new transactions. In the presence of
|
||||
long-running transactions or transactions producing large amounts of
|
||||
data, the buffer size must be sufficient to hold all log information
|
||||
that can accumulate during the longest running transaction. 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.])
|
||||
|
||||
m4_env_config(dbenv_set_lg_bsize,
|
||||
[log buffer size], set_lg_bsize, [the size in bytes])
|
||||
|
||||
m4_scope_env(dbenv_set_lg_bsize)
|
||||
|
||||
m4_when_envopen(dbenv_set_lg_bsize, ignored)
|
||||
|
||||
m4_return(dbenv_set_lg_bsize, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(lg_bsize, [dnl
|
||||
The m4_arg(lg_bsize) parameter is the size of the in-memory log buffer,
|
||||
in bytes.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(dbenv_set_lg_bsize, einval)
|
||||
|
||||
m4_pf_getter(dbenv_get_lg_bsize, [size of the log buffer, in bytes],, lg_bsizep)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
57
docs_src/log/env_set_lg_dir.so
Normal file
57
docs_src/log/env_set_lg_dir.so
Normal file
@@ -0,0 +1,57 @@
|
||||
m4_comment([$Id: env_set_lg_dir.so,v 10.25 2004/09/28 15:04:21 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [dbenv_set_lg_dir, dbenv_get_lg_dir])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(dbenv_set_lg_dir),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__set_lg_dir(DB_ENV *dbenv, const char *dir);
|
||||
m4_blank
|
||||
int
|
||||
DB_ENV-__GT__get_lg_dir(DB_ENV *dbenv, const char **dirp);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::set_lg_dir(const char *dir);
|
||||
m4_blank
|
||||
int
|
||||
DbEnv::get_lg_dir(const char **dirp);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The path of a directory to be used as the location of logging files.
|
||||
Log files created by the Log Manager subsystem will be created in this
|
||||
directory.])
|
||||
|
||||
m4_p([dnl
|
||||
If no logging directory is specified, log files are created in the
|
||||
environment home directory. See m4_link(M4RELDIR/ref/env/naming,
|
||||
[m4_db File Naming]) for more information.])
|
||||
|
||||
m4_p([dnl
|
||||
For the greatest degree of recoverability from system or application
|
||||
failure, database files and log files should be located on separate
|
||||
physical devices.])
|
||||
|
||||
m4_env_config(dbenv_set_lg_dir,
|
||||
[logging directory], set_lg_dir, [the directory name])
|
||||
|
||||
m4_scope_dbenv(dbenv_set_lg_dir)
|
||||
|
||||
m4_when_envopen(dbenv_set_lg_dir, corrupt)
|
||||
|
||||
m4_return(dbenv_set_lg_dir, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param_utf8(dir, [dnl
|
||||
The m4_arg(dir) parameter is the directory used to store the logging files.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(dbenv_set_lg_dir,
|
||||
einval, [the method was called after m4_ref(dbenv_open) was called])
|
||||
|
||||
m4_pf_getter(dbenv_get_lg_dir, log directory,, dirp, reference)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
75
docs_src/log/env_set_lg_max.so
Normal file
75
docs_src/log/env_set_lg_max.so
Normal file
@@ -0,0 +1,75 @@
|
||||
m4_comment([$Id: env_set_lg_max.so,v 10.45 2004/09/28 15:04:21 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [dbenv_set_lg_max, dbenv_get_lg_max])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(dbenv_set_lg_max),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__set_lg_max(DB_ENV *dbenv, u_int32_t lg_max);
|
||||
m4_blank
|
||||
int
|
||||
DB_ENV-__GT__get_lg_max(DB_ENV *dbenv, u_int32_t *lg_maxp);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::set_lg_max(u_int32_t lg_max);
|
||||
m4_blank
|
||||
int
|
||||
DbEnv::get_lg_max(u_int32_t *);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Set the maximum size of a single file in the log, in bytes. Because
|
||||
m4_ref(DbLsn) file offsets are unsigned four-byte values, the set
|
||||
value may not be larger than the maximum unsigned four-byte value.])
|
||||
|
||||
m4_p([dnl
|
||||
When the logging subsystem is configured for on-disk logging, the
|
||||
default size of a log file is 10MB.])
|
||||
|
||||
m4_p([dnl
|
||||
When the logging subsystem is configured for in-memory logging, the
|
||||
default size of a log file is 256KB. In addition, the configured log
|
||||
buffer size must be larger than the log file size. (The logging
|
||||
subsystem divides memory configured for in-memory log records into
|
||||
"files", as database environments configured for in-memory log records
|
||||
may exchange log records with other members of a replication group, and
|
||||
those members may be configured to store log records on-disk.) 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.])
|
||||
|
||||
m4_p([dnl
|
||||
See m4_link(M4RELDIR/ref/log/limits, [Log File Limits]) for more
|
||||
information.])
|
||||
|
||||
m4_env_config(dbenv_set_lg_max,
|
||||
[log file size], set_lg_max, [the size in bytes])
|
||||
|
||||
m4_scope_env(dbenv_set_lg_max)
|
||||
|
||||
m4_when_any(dbenv_set_lg_max)
|
||||
If no size is specified by the application, the size last specified for
|
||||
the database region will be used, or if no database region previously
|
||||
existed, the default will be used.
|
||||
|
||||
m4_return(dbenv_set_lg_max, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(lg_max, [dnl
|
||||
The m4_arg(lg_max) parameter is the size of a single log file, in bytes.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(dbenv_set_lg_max,
|
||||
einval, [the method was called after m4_ref(dbenv_open) was called;
|
||||
the size of the log file is less than four times the size of the in-memory
|
||||
log buffer;
|
||||
The specified log file size was too large])
|
||||
|
||||
m4_pf_getter(dbenv_get_lg_max, maximum log file size,, lg_maxp)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
55
docs_src/log/env_set_lg_mode.so
Normal file
55
docs_src/log/env_set_lg_mode.so
Normal file
@@ -0,0 +1,55 @@
|
||||
m4_comment([$Id: env_set_lg_mode.so,v 1.1 2004/12/15 15:46:44 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [dbenv_set_lg_filemode, dbenv_get_lg_filemode])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(dbenv_set_lg_filemode),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__set_lg_filemode(DB_ENV *dbenv, int lg_mode);
|
||||
m4_blank
|
||||
int
|
||||
DB_ENV-__GT__get_lg_filemode(DB_ENV *dbenv, int *lg_modep);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::set_lg_filemode(int lg_mode);
|
||||
m4_blank
|
||||
int
|
||||
DbEnv::get_lg_filemode(int *);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Set the absolute file mode for created log files. This method is
|
||||
m4_bold(only) useful for the rare m4_db application that does not
|
||||
control its umask value.])
|
||||
|
||||
m4_p([dnl
|
||||
Normally, if m4_db applications set their umask appropriately, all
|
||||
processes in the application suite will have read permission on the log
|
||||
files created by any process in the application suite. However, if the
|
||||
m4_db application is a library, a process using the library might set
|
||||
its umask to a value preventing other processes in the application suite
|
||||
from reading the log files it creates. In this rare case, the
|
||||
m4_refT(dbenv_set_lg_filemode) can be used to set the mode of created
|
||||
log files to an absolute value.])
|
||||
|
||||
m4_env_config(dbenv_set_lg_filemode,
|
||||
[log file mode], set_lg_filemode, [the absolute mode of created log files])
|
||||
|
||||
m4_scope_env(dbenv_set_lg_filemode)
|
||||
|
||||
m4_when_any(dbenv_set_lg_filemode)
|
||||
|
||||
m4_return(dbenv_set_lg_filemode, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(lg_filemode, [dnl
|
||||
The m4_arg(lg_filemode) parameter is the absolute mode of the created
|
||||
log file.])
|
||||
m4_paramend
|
||||
|
||||
m4_pf_getter(dbenv_get_lg_filemode, log file mode,, lg_modep)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
52
docs_src/log/env_set_lg_regionmax.so
Normal file
52
docs_src/log/env_set_lg_regionmax.so
Normal file
@@ -0,0 +1,52 @@
|
||||
m4_comment([$Id: env_set_lg_regionmax.so,v 10.23 2006/08/30 10:04:48 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [dbenv_set_lg_regionmax, dbenv_get_lg_regionmax])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(dbenv_set_lg_regionmax),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__set_lg_regionmax(DB_ENV *dbenv, u_int32_t lg_regionmax);
|
||||
m4_blank
|
||||
int
|
||||
DB_ENV-__GT__get_lg_regionmax(DB_ENV *dbenv, u_int32_t *lg_regionmaxp);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::set_lg_regionmax(u_int32_t lg_regionmax);
|
||||
m4_blank
|
||||
int
|
||||
DbEnv::get_lg_regionmax(u_int32_t *lg_regionmaxp);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Set the size of the underlying logging area of the m4_db environment,
|
||||
in bytes. By default, or if the value is set to 0, the default size is
|
||||
approximately 60KB. The log region is used to store filenames, and so
|
||||
may need to be increased in size if a large number of files will be
|
||||
opened and registered with the specified m4_db environment's log
|
||||
manager.])
|
||||
|
||||
m4_env_config(dbenv_set_lg_regionmax,
|
||||
[log region size], set_lg_regionmax, [the size in bytes])
|
||||
|
||||
m4_scope_env(dbenv_set_lg_regionmax)
|
||||
|
||||
m4_when_envopen(dbenv_set_lg_regionmax, ignored)
|
||||
|
||||
m4_return(dbenv_set_lg_regionmax, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(lg_regionmax, [dnl
|
||||
The m4_arg(lg_regionmax) parameter is the size of the logging area in
|
||||
the m4_db environment, in bytes.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(dbenv_set_lg_regionmax,
|
||||
einval, [the method was called after m4_ref(dbenv_open) was called])
|
||||
|
||||
m4_pf_getter(dbenv_get_lg_regionmax,
|
||||
size of the underlying logging subsystem region,, lg_regionmaxp)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
101
docs_src/log/log_archive.so
Normal file
101
docs_src/log/log_archive.so
Normal file
@@ -0,0 +1,101 @@
|
||||
m4_comment([$Id: log_archive.so,v 10.49 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, log_archive)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_archive),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_archive(DB_ENV *env, char *(*listp)__LB____RB__, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_archive(char *(*listp)__LB____RB__, u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_archive) returns an array of log or database filenames.])
|
||||
|
||||
m4_p([dnl
|
||||
By default, m4_ref(log_archive) returns the names of all of the log
|
||||
files that are no longer in use (for example, that are no longer
|
||||
involved in active transactions), and that may safely be archived for
|
||||
catastrophic recovery and then removed from the system. If there are
|
||||
no filenames to return, the memory location to which m4_arg(listp)
|
||||
refers will be set to NULL.])
|
||||
|
||||
m4_alloc([Arrays of log filenames])
|
||||
|
||||
m4_p([dnl
|
||||
Log cursor handles (returned by the m4_refT(log_cursor)) may have open
|
||||
file descriptors for log files in the database environment. Also, the
|
||||
m4_db interfaces to the database environment logging subsystem (for
|
||||
example, m4_ref(log_put) and m4_ref(txn_abort)) may allocate log cursors
|
||||
and have open file descriptors for log files as well. On operating
|
||||
systems where filesystem related system calls (for example, rename and
|
||||
unlink on Windows/NT) can fail if a process has an open file descriptor
|
||||
for the affected file, attempting to move or remove the log files listed
|
||||
by m4_ref(log_archive) may fail. All m4_db internal use of log cursors
|
||||
operates on active log files only and furthermore, is short-lived in
|
||||
nature. So, an application seeing such a failure should be restructured
|
||||
to close any open log cursors it may have, and otherwise to retry the
|
||||
operation until it succeeds. (Although the latter is not likely to be
|
||||
necessary; it is hard to imagine a reason to move or rename a log file
|
||||
in which transactions are being logged or aborted.)])
|
||||
|
||||
m4_p([dnl
|
||||
See m4_ref(db_archive) for more information on database archival
|
||||
procedures.])
|
||||
|
||||
m4_underfunc(log_archive, log_archive, db_archive)
|
||||
|
||||
m4_return(log_archive, std)
|
||||
|
||||
m4_parambegin
|
||||
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_may
|
||||
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_ARCH_ABS), [dnl
|
||||
All pathnames are returned as absolute pathnames, instead of relative
|
||||
to the database home directory.])
|
||||
|
||||
m4_tag(m4_idef(DB_ARCH_DATA), [dnl
|
||||
Return the database files that need to be archived in order to recover
|
||||
the database from catastrophic failure. If any of the database files
|
||||
have not been accessed during the lifetime of the current log files,
|
||||
m4_ref(log_archive) will not include them in this list. It is also
|
||||
possible that some of the files referred to by the log have since been
|
||||
deleted from the system.
|
||||
m4_p([dnl
|
||||
The DB_ARCH_DATA and DB_ARCH_LOG flags are mutually exclusive.])])
|
||||
|
||||
m4_tag(m4_idef(DB_ARCH_LOG), [dnl
|
||||
Return all the log filenames, regardless of whether or not they are in
|
||||
use.
|
||||
m4_p([dnl
|
||||
The DB_ARCH_DATA and DB_ARCH_LOG flags are mutually exclusive.])])
|
||||
|
||||
m4_tag(m4_idef(DB_ARCH_REMOVE), [dnl
|
||||
Remove log files that are no longer needed; no filenames are returned.
|
||||
Automatic log file removal is likely to make catastrophic recovery
|
||||
impossible.
|
||||
m4_p([dnl
|
||||
The DB_ARCH_REMOVE flag may not be specified with any other
|
||||
flag.])])
|
||||
|
||||
m4_tagend])
|
||||
|
||||
m4_param(listp, [dnl
|
||||
The m4_arg(listp) parameter references memory into which the allocated
|
||||
array of log or database filenames is copied. If there are no filenames
|
||||
to return, the memory location to which m4_arg(listp) refers will be set
|
||||
to NULL.])
|
||||
|
||||
m4_paramend
|
||||
|
||||
m4_err(log_archive, einval)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
34
docs_src/log/log_compare.so
Normal file
34
docs_src/log/log_compare.so
Normal file
@@ -0,0 +1,34 @@
|
||||
m4_comment([$Id: log_compare.so,v 10.22 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, log_compare)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_compare),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
log_compare(const DB_LSN *lsn0, const DB_LSN *lsn1);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
static int
|
||||
DbEnv::log_compare(const DbLsn *lsn0, const DbLsn *lsn1);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_compare) allows the caller to compare two
|
||||
ifelse(M4API, C_API, [DB_LSN structures,], [m4_ref(DbLsn) objects,])
|
||||
returning 0 if they are equal, 1 if m4_arg(lsn0) is greater than
|
||||
m4_arg(lsn1), and -1 if m4_arg(lsn0) is less than m4_arg(lsn1).])
|
||||
|
||||
m4_parambegin
|
||||
m4_param(lsn0, [dnl
|
||||
The m4_arg(lsn0) parameter is one of the
|
||||
ifelse(M4API, C_API, [DB_LSN structures], [m4_ref(DbLsn) objects])
|
||||
to be compared.])
|
||||
m4_param(lsn1, [dnl
|
||||
The m4_arg(lsn1) parameter is one of the
|
||||
ifelse(M4API, C_API, [DB_LSN structures], [m4_ref(DbLsn) objects])
|
||||
to be compared.])
|
||||
m4_paramend
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
29
docs_src/log/log_cursor.so
Normal file
29
docs_src/log/log_cursor.so
Normal file
@@ -0,0 +1,29 @@
|
||||
m4_comment([$Id: log_cursor.so,v 10.12 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, log_cursor)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_cursor),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_cursor(DB_ENV *dbenv, DB_LOGC **cursorp, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_cursor(DbLogc **cursorp, u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_cursor) returns a created log cursor.])
|
||||
|
||||
m4_return(log_cursor, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param_co(cursorp, created log cursor, REF)
|
||||
m4_unusedflags
|
||||
m4_paramend
|
||||
|
||||
m4_err(log_cursor, einval)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
51
docs_src/log/log_file.so
Normal file
51
docs_src/log/log_file.so
Normal file
@@ -0,0 +1,51 @@
|
||||
m4_comment([$Id: log_file.so,v 10.34 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, log_file)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_file),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_file(DB_ENV *env,
|
||||
const DB_LSN *lsn, char *namep, size_t len);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_file(const DbLsn *lsn, char *namep, size_t len);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_file) maps
|
||||
ifelse(M4API, C_API, [DB_LSN structures], [m4_ref(DbLsn) objects])
|
||||
to filenames, returning the name of the file containing the record named
|
||||
by m4_arg(lsn).])
|
||||
|
||||
m4_p([dnl
|
||||
This mapping of
|
||||
ifelse(M4API, C_API, [DB_LSN structures], [m4_ref(DbLsn) objects])
|
||||
to files is needed for database administration. For example, a
|
||||
transaction manager typically records the earliest m4_ref(DbLsn) needed
|
||||
for restart, and the database administrator may want to archive log
|
||||
files to tape when they contain only m4_ref(DbLsn) entries before the
|
||||
earliest one needed for restart.])
|
||||
|
||||
m4_return(log_file, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(lsn, [dnl
|
||||
The m4_arg(lsn) parameter is the
|
||||
ifelse(M4API, C_API, [DB_LSN structure], [m4_ref(DbLsn) object])
|
||||
for which a filename is wanted.])
|
||||
m4_param_co(namep, name of the file containing the record named by m4_arg(lsn))
|
||||
m4_param(len, [dnl
|
||||
The m4_arg(len) parameter is the length of the m4_arg(namep) buffer in
|
||||
bytes. If m4_arg(namep) is too short to hold the filename,
|
||||
m4_ref(log_file) will fail. (Log filenames are normally quite short,
|
||||
on the order of 10 characters.)])
|
||||
m4_paramend
|
||||
|
||||
m4_err(log_file,
|
||||
einval, [supplied buffer was too small to hold the log filename])
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
31
docs_src/log/log_flush.so
Normal file
31
docs_src/log/log_flush.so
Normal file
@@ -0,0 +1,31 @@
|
||||
m4_comment([$Id: log_flush.so,v 10.31 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, log_flush)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_flush),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_flush(DB_ENV *env, const DB_LSN *lsn);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_flush(const DbLsn *lsn);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_flush) writes log records to disk.])
|
||||
|
||||
m4_return(log_flush, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(lsn, [dnl
|
||||
All log records with m4_ref(DbLsn) values less than or equal to the
|
||||
m4_arg(lsn) parameter are written to disk. If m4_arg(lsn) is NULL,
|
||||
all records in the log are flushed.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(log_flush, einval)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
7
docs_src/log/log_list.so
Normal file
7
docs_src/log/log_list.so
Normal file
@@ -0,0 +1,7 @@
|
||||
m4_comment([$Id: log_list.so,v 1.1 2002/08/30 20:00:56 bostic Exp $])
|
||||
|
||||
m4_page_title([m4_db: Logging Subsystem and Related Methods])
|
||||
|
||||
include(log/m4.methods)
|
||||
|
||||
m4_page_footer
|
||||
45
docs_src/log/log_printf.so
Normal file
45
docs_src/log/log_printf.so
Normal file
@@ -0,0 +1,45 @@
|
||||
m4_comment([$Id: log_printf.so,v 1.1 2005/09/30 19:00:24 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, log_printf)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_printf),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_printf(DB_ENV *env, DB_TXN *txnid, const char *fmt, ...);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_printf(DB_TXN *txnid, const char *fmt, ...);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_printf) appends an informational message to the m4_db
|
||||
database environment log files.])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_printf) allows applications to include information in
|
||||
the database environment log files, for later review using the
|
||||
m4_ref(db_printlog) utility. This method is intended for debugging and
|
||||
performance tuning.])
|
||||
|
||||
m4_return(log_printf, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(txnid, [dnl
|
||||
If the logged message refers to an application-specified transaction,
|
||||
the m4_arg(txnid) parameter is a transaction handle returned from
|
||||
m4_ref(txn_begin); otherwise NULL.])
|
||||
|
||||
m4_param(fmt, [dnl
|
||||
A format string that specifies how subsequent arguments (or arguments
|
||||
accessed via the variable-length argument facilities of stdarg(3)) are
|
||||
converted for output. The format string may contain any formatting
|
||||
directives supported by the underlying C library vsnprintf(3)
|
||||
function.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(log_printf, einval)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
53
docs_src/log/log_put.so
Normal file
53
docs_src/log/log_put.so
Normal file
@@ -0,0 +1,53 @@
|
||||
m4_comment([$Id: log_put.so,v 10.41 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, log_put)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_put),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_put(DB_ENV *env,
|
||||
DB_LSN *lsn, const DBT *data, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_put(DbLsn *lsn, const Dbt *data, u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_put) appends records to the log. The m4_ref(DbLsn) of
|
||||
the put record is returned in the m4_arg(lsn) parameter.])
|
||||
|
||||
m4_return(log_put, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(data, [dnl
|
||||
The m4_arg(data) parameter is the record to write to the log.
|
||||
m4_p([dnl
|
||||
The caller is responsible for providing any necessary structure to
|
||||
m4_arg(data). (For example, in a write-ahead logging protocol, the
|
||||
application must understand what part of m4_arg(data) is an operation
|
||||
code, what part is redo information, and what part is undo information.
|
||||
In addition, most transaction managers will store in m4_arg(data) the
|
||||
m4_ref(DbLsn) of the previous log record for the same transaction, to
|
||||
support chaining back through the transaction's log records during
|
||||
undo.)])])
|
||||
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_zmust(0)
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_FLUSH), [dnl
|
||||
The log is forced to disk after this record is written, guaranteeing
|
||||
that all records with m4_ref(DbLsn) values less than or equal to the
|
||||
one being "put" are on disk before m4_ref(log_put) returns.])
|
||||
m4_tagend])
|
||||
|
||||
m4_param_co(lsn, m4_ref(DbLsn) of the put record)
|
||||
|
||||
m4_paramend
|
||||
|
||||
m4_err(log_flush,
|
||||
einval, [the record to be logged is larger than the maximum log record])
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
125
docs_src/log/log_stat.so
Normal file
125
docs_src/log/log_stat.so
Normal file
@@ -0,0 +1,125 @@
|
||||
m4_comment([$Id: log_stat.so,v 10.59 2007/09/21 20:06:02 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [log_stat, log_stat_print])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(log_stat),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_ENV-__GT__log_stat(DB_ENV *env, DB_LOG_STAT **statp, u_int32_t flags);
|
||||
m4_blank
|
||||
int
|
||||
DB_ENV-__GT__log_stat_print(DB_ENV *env, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbEnv::log_stat(DB_LOG_STAT **statp, u_int32_t flags);
|
||||
m4_blank
|
||||
int
|
||||
DbEnv::log_stat_print(u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_stat) returns the logging subsystem statistics.])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(log_stat) creates a statistical structure of type
|
||||
DB_LOG_STAT and copies a pointer to it into a user-specified memory
|
||||
location.])
|
||||
|
||||
m4_alloc([Statistical structures])
|
||||
|
||||
m4_p([dnl
|
||||
The following DB_LOG_STAT fields will be filled in:])
|
||||
|
||||
m4_tagbegin
|
||||
m4_field(u_int32_t, st_magic,
|
||||
[The magic number that identifies a file as a log file.])
|
||||
|
||||
m4_field(u_int32_t, st_version,
|
||||
[The version of the log file type.])
|
||||
|
||||
m4_field(int, st_mode,
|
||||
[The mode of any created log files.])
|
||||
|
||||
m4_field(u_int32_t, st_lg_bsize,
|
||||
[The in-memory log record cache size.])
|
||||
|
||||
m4_field(u_int32_t, st_lg_size,
|
||||
[The log file size.])
|
||||
|
||||
m4_field(u_int32_t, st_record,
|
||||
[The number of records written to this log.])
|
||||
|
||||
m4_field(u_int32_t, st_w_mbytes,
|
||||
[The number of megabytes written to this log.])
|
||||
|
||||
m4_field(u_int32_t, st_w_bytes,
|
||||
[The number of bytes over and above m4_arg(st_w_mbytes) written to this log.])
|
||||
|
||||
m4_field(u_int32_t, st_wc_mbytes,
|
||||
[The number of megabytes written to this log since the last checkpoint.])
|
||||
|
||||
m4_field(u_int32_t, st_wc_bytes,
|
||||
[The number of bytes over and above m4_arg(st_wc_mbytes) written to this log
|
||||
since the last checkpoint.])
|
||||
|
||||
m4_field(u_int32_t, st_wcount,
|
||||
[The number of times the log has been written to disk.])
|
||||
|
||||
m4_field(u_int32_t, st_wcount_fill,
|
||||
[The number of times the log has been written to disk because the
|
||||
in-memory log record cache filled up.])
|
||||
|
||||
m4_field(u_int32_t, st_rcount,
|
||||
[The number of times the log has been read from disk.])
|
||||
|
||||
m4_field(u_int32_t, st_scount,
|
||||
[The number of times the log has been flushed to disk.])
|
||||
|
||||
m4_field(u_int32_t, st_cur_file,
|
||||
[The current log file number.])
|
||||
|
||||
m4_field(u_int32_t, st_cur_offset,
|
||||
[The byte offset in the current log file.])
|
||||
|
||||
m4_field(u_int32_t, st_disk_file,
|
||||
[The log file number of the last record known to be on disk.])
|
||||
|
||||
m4_field(u_int32_t, st_disk_offset,
|
||||
[The byte offset of the last record known to be on disk.])
|
||||
|
||||
m4_field(u_int32_t, st_maxcommitperflush,
|
||||
[The maximum number of commits contained in a single log flush.])
|
||||
|
||||
m4_field(u_int32_t, st_mincommitperflush,
|
||||
[The minimum number of commits contained in a single log flush that
|
||||
contained a commit.])
|
||||
|
||||
m4_field(roff_t, st_regsize,
|
||||
[The size of the log region, in bytes.])
|
||||
|
||||
m4_field(u_int32_t, st_region_wait,
|
||||
[The number of times that a thread of control was forced to wait before
|
||||
obtaining the log region mutex.])
|
||||
|
||||
m4_field(u_int32_t, st_region_nowait,
|
||||
[The number of times that a thread of control was able to obtain
|
||||
the log region mutex without waiting.])
|
||||
m4_tagend
|
||||
|
||||
m4_when(log_stat, before, dbenv_open)
|
||||
|
||||
m4_return(log_stat, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(flags, m4_stat_flags)
|
||||
m4_param_co(statp, allocated statistics structure, REF)
|
||||
m4_paramend
|
||||
|
||||
m4_err(log_stat, einval)
|
||||
|
||||
m4_stat_print(log_stat_print, logging subsystem, log_stat)
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
22
docs_src/log/logc_class.so
Normal file
22
docs_src/log/logc_class.so
Normal file
@@ -0,0 +1,22 @@
|
||||
m4_comment([$Id: logc_class.so,v 1.8 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, DbLogc)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(DbLogc),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
typedef struct __db_log_cursor DB_LOGC;
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
class DbLogc { ... };
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_ref(DbLogc) object is the handle for a cursor into the log files,
|
||||
supporting sequential access to the records stored in log files. The
|
||||
handle is not free-threaded. Once the m4_refT(logc_close) is called,
|
||||
the handle may not be accessed again, regardless of that method's
|
||||
return.])
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
30
docs_src/log/logc_close.so
Normal file
30
docs_src/log/logc_close.so
Normal file
@@ -0,0 +1,30 @@
|
||||
m4_comment([$Id: logc_close.so,v 10.13 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, logc_close)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(logc_close),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_LOGC-__GT__close(DB_LOGC *cursor, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbLogc::close(u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(logc_close) discards the log cursor. After m4_ref(logc_close)
|
||||
has been called, regardless of its return, the cursor handle may not be
|
||||
used again.])
|
||||
|
||||
m4_return(logc_close, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_unusedflags
|
||||
m4_paramend
|
||||
|
||||
m4_err(logc_close, einval, [the cursor was previously closed])
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
101
docs_src/log/logc_get.so
Normal file
101
docs_src/log/logc_get.so
Normal file
@@ -0,0 +1,101 @@
|
||||
m4_comment([$Id: logc_get.so,v 10.48 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL,
|
||||
[logc_get, DB_CURRENT, DB_FIRST, DB_LAST, DB_NEXT, DB_PREV, DB_SET])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(logc_get),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_LOGC-__GT__get(DB_LOGC *logc, DB_LSN *lsn, DBT *data, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbLogc::get(DbLsn *lsn, Dbt *data, u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(logc_get) returns records from the log.])
|
||||
|
||||
m4_return(logc_get, prev)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(data, [dnl
|
||||
The data field of the m4_arg(data) structure is set to the record
|
||||
retrieved, and the size field indicates the number of bytes in the
|
||||
record. See m4_ref(Dbt) for a description of other fields in the
|
||||
m4_arg(data) structure. The m4_ref(DB_DBT_MALLOC),
|
||||
m4_ref(DB_DBT_REALLOC) and m4_ref(DB_DBT_USERMEM) flags may be specified
|
||||
for any m4_ref(Dbt) used for data retrieval.])
|
||||
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_must
|
||||
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_CURRENT), [dnl
|
||||
Return the log record to which the log currently refers.])
|
||||
|
||||
m4_tag(m4_idef(DB_FIRST), [dnl
|
||||
The first record from any of the log files found in the log directory
|
||||
is returned in the m4_arg(data) parameter.
|
||||
The m4_arg(lsn) parameter is overwritten with the m4_ref(DbLsn) of the
|
||||
record returned.
|
||||
m4_return(logc_get, specific, DB_NOTFOUND,
|
||||
[if m4_ref(DB_FIRST) is set and the log is empty])])
|
||||
|
||||
m4_tag(m4_idef(DB_LAST), [dnl
|
||||
The last record in the log is returned in the m4_arg(data) parameter.
|
||||
The m4_arg(lsn) parameter is overwritten with the m4_ref(DbLsn) of the
|
||||
record returned.
|
||||
m4_return(logc_get, specific, DB_NOTFOUND,
|
||||
[if m4_ref(DB_LAST) is set and the log is empty])])
|
||||
|
||||
m4_tag([m4_idef(DB_NEXT)], [dnl
|
||||
The current log position is advanced to the next record in the log, and
|
||||
that record is returned in the m4_arg(data) parameter. The m4_arg(lsn)
|
||||
parameter is overwritten with the m4_ref(DbLsn) of the record returned.
|
||||
m4_p([dnl
|
||||
If the cursor has not been initialized via DB_FIRST, DB_LAST, DB_SET,
|
||||
DB_NEXT, or DB_PREV, m4_ref(logc_get) will return the first record in
|
||||
the log.])
|
||||
m4_return(logc_get, specific, DB_NOTFOUND,
|
||||
[if m4_ref(DB_NEXT) is set and the last log record has already been
|
||||
returned or the log is empty])])
|
||||
|
||||
m4_tag([m4_idef(DB_PREV)], [dnl
|
||||
The current log position is advanced to the previous record in the log,
|
||||
and that record is returned in the m4_arg(data) parameter. The
|
||||
m4_arg(lsn) parameter is overwritten with the m4_ref(DbLsn) of the record
|
||||
returned.
|
||||
m4_p([dnl
|
||||
If the cursor has not been initialized via DB_FIRST, DB_LAST, DB_SET,
|
||||
DB_NEXT, or DB_PREV, m4_ref(logc_get) will return the last record in the
|
||||
log.])
|
||||
m4_return(logc_get, specific, DB_NOTFOUND,
|
||||
[if m4_ref(DB_PREV) is set and the first log record has already been
|
||||
returned or the log is empty])])
|
||||
|
||||
m4_tag(m4_idef(DB_SET), [dnl
|
||||
Retrieve the record specified by the m4_arg(lsn) parameter.])
|
||||
m4_tagend])
|
||||
|
||||
m4_param(lsn, [dnl
|
||||
When the m4_arg(flag) parameter is set to m4_ref(DB_CURRENT),
|
||||
m4_ref(DB_FIRST), m4_ref(DB_LAST), m4_ref(DB_NEXT) or m4_ref(DB_PREV),
|
||||
the m4_arg(lsn) parameter is overwritten with the m4_ref(DbLsn) value
|
||||
of the record retrieved. When m4_arg(flag) is set to m4_ref(DB_SET),
|
||||
the m4_arg(lsn) parameter is the m4_ref(DbLsn) value of the record to
|
||||
be retrieved.])
|
||||
|
||||
m4_paramend
|
||||
|
||||
m4_err(logc_get, einval,
|
||||
[the m4_ref(DB_CURRENT) flag was set and the log cursor has not yet
|
||||
been initialized;
|
||||
the m4_ref(DB_CURRENT), m4_ref(DB_NEXT), or m4_ref(DB_PREV) flags were
|
||||
set and the log was opened with the DB_THREAD flag set;
|
||||
the m4_ref(DB_SET) flag was set and the specified log sequence number
|
||||
does not appear in the log])
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
21
docs_src/log/lsn_class.so
Normal file
21
docs_src/log/lsn_class.so
Normal file
@@ -0,0 +1,21 @@
|
||||
m4_comment([$Id: lsn_class.so,v 10.21 2004/08/13 03:38:57 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, DbLsn)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(DbLsn),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
typedef struct __db_lsn DB_LSN;
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
class DbLsn : public DB_LSN { ... };
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_ref(DbLsn) object is a m4_bold([log sequence number]) which
|
||||
specifies a unique location in a log file. A m4_ref(DbLsn) consists of
|
||||
two unsigned 32-bit integers -- one specifies the log file number, and
|
||||
the other specifies an offset in the log file.])
|
||||
|
||||
m4_seealso(DbLog)
|
||||
m4_page_footer
|
||||
29
docs_src/log/m4.methods
Normal file
29
docs_src/log/m4.methods
Normal file
@@ -0,0 +1,29 @@
|
||||
m4_comment([$Id: m4.methods,v 1.7 2008/01/23 21:15:44 sarette Exp $])
|
||||
|
||||
m4_table_begin(, _center)
|
||||
|
||||
m4_table_header(Logging Subsystem and Related Methods, Description)
|
||||
m4_comment([DbLsn])m4_table_element(m4_ref(DbLsn), Log Sequence Numbers)
|
||||
m4_comment([log_compare])m4_table_element(m4_ref(log_compare), Compare two Log Sequence Numbers)
|
||||
m4_comment([DbEnv::log_archive])m4_table_element(m4_ref(log_archive), List log and database files)
|
||||
m4_comment([DbEnv::log_file])m4_table_element(m4_ref(log_file), Map Log Sequence Numbers to log files)
|
||||
m4_comment([DbEnv::log_flush])m4_table_element(m4_ref(log_flush), Flush log records)
|
||||
m4_comment([DbEnv::log_printf])m4_table_element(m4_ref(log_printf), Append informational message to the log)
|
||||
m4_comment([DbEnv::log_put])m4_table_element(m4_ref(log_put), Write a log record)
|
||||
m4_comment([DbEnv::log_stat])m4_table_element(m4_ref(log_stat), Return log subsystem statistics)
|
||||
|
||||
m4_table_header(Logging Subsystem Cursors, _empty)
|
||||
m4_comment([DbLogc::])ifelse(M4API, CXX_API, [m4_table_element(m4_ref(DbLogc), Log Cursor Object)])
|
||||
m4_comment([DbLogc::])m4_table_element(m4_ref(log_cursor), Create a log cursor handle)
|
||||
m4_comment([DbLogc::close])m4_table_element(m4_ref(logc_close), Close a log cursor)
|
||||
m4_comment([DbLogc::get])m4_table_element(m4_ref(logc_get), Retrieve a log record)
|
||||
|
||||
m4_table_header(Logging Subsystem Configuration, _empty)
|
||||
m4_comment([DbEnv::log_set_config])m4_table_element(m4_ref(dbenv_log_set_config), Configure the logging subsystem)
|
||||
m4_comment([DbEnv::set_lg_bsize])m4_table_element(m4_ref(dbenv_set_lg_bsize), Set log buffer size)
|
||||
m4_comment([DbEnv::set_lg_dir])m4_table_element(m4_ref(dbenv_set_lg_dir), Set the environment logging directory)
|
||||
m4_comment([DbEnv::set_lg_filemode])m4_table_element(m4_ref(dbenv_set_lg_filemode), Set log file mode)
|
||||
m4_comment([DbEnv::set_lg_max])m4_table_element(m4_ref(dbenv_set_lg_max), Set log file size)
|
||||
m4_comment([DbEnv::set_lg_regionmax])m4_table_element(m4_ref(dbenv_set_lg_regionmax), Set logging region size)
|
||||
|
||||
m4_table_end
|
||||
Reference in New Issue
Block a user