The xSQL configuration file can be used to define eXtremeDB Transaction Logging parameters corresponding to the C API
mco_TL_start_data_tstructure.For an overview see page Configuration File Parameters
The
tl_paramssection consists of a set of "name : value" pairs enclosed within braces. For example:tl_params : { flags : [crc, iterable], log_path : "my.log", ... }The following table lists the possible options for the
tl_paramssection with the corresponding C API structures and values specified in the comment:
Option name : example value Comment flags : [crc, iterable], Transaction log flags (
mco_TL_start_data::flags). Combination of
crc(MCO_TRANSLOG_CRC) and
iterable(MCO_TRANSLOG_ITERABLE)
MCO_TRANSLOG_APPEND,MCO_TRANSLOG_SIZE_CLBK,MCO_TRANSLOG_SYNC_INSTANTLYandMCO_TRANSLOG_SYNC_COUNTare enabled automatically (see below)Default value
0log_path : "my.log", Path to logfile. Required, no default value.snapshot_path : "my.img", Path to saved image used by mco_translog_db_save(). Not required, but if not set, themco_translog_db_save()API cannot be calleddisk_page_size : 4096, Size of single disk page in bytes ( mco_TL_start_data::disk_page_size). Default value 4096flush_depth : 10, Maximum count of records not flushed (
mco_TL_start_data::flush_depth).If set to 0, don't flush. If set to 1, the
MCO_TRANSLOG_SYNC_INSTANTLYflag is automatically set. If > 1,MCO_TRANSLOG_SYNC_COUNTflag is automatically setDefault value
0(no flushing)max_size : 1m, Max size of log file in bytes. When the limit is reached the
mco_translog_db_save()is automatically called. It saves a database image and truncates the log file. Parametersnapshot_pathis required whenmax_size> 0Default value
0(no limit)snapshot_period : 5000, Period in milliseconds to automatically call
mco_translog_db_save().This function saves a database image and truncates the log file. Parameter
snapshot_pathis required whensnapshot_period> 0Can be used together with
max_sizeDefault value
0(don't snapshot periodically)apply : auto, Whether to apply saved TL files when the xSQL is started. Possible values are:
yes- do apply (mco_db_load(snapshot_path) + mco_translog_apply(log_path)). If files do not exist or another error occurs, don't start xSQL
no- don't apply TL, just create the database with specified parameters
auto- apply TL ifsnapshot_pathandlog_pathfiles existDefault value
autostopped : false, Boolean parameter, if
truethen TL is not started automatically (but is configured)Default value
false