Error log, lock, logging and transaction parameters
These parameters are set in coradb.conf. For how to set them, which ones can be changed while the server runs, and the full list of parameters, see System parameters.
Error message-related parameters
Section titled “Error message-related parameters”The following are parameters related to processing error messages recorded by CoraDB. The type and value range for each parameter are as follows:
| Parameter name | Type | Default |
|---|---|---|
| call_stack_dump_activation_list | string | DEFAULT |
| call_stack_dump_deactivation_list | string | NULL |
| call_stack_dump_on_error | bool | no |
| error_log | string | cora_client.err, cora_server.err |
| error_log_level | string | NOTIFICATION |
| error_log_warning | bool | no |
| error_log_size | int | 512M |
call_stack_dump_activation_list
Section titled “call_stack_dump_activation_list”call_stack_dump_activation_list is a parameter to configure a certain error number for which a call stack is to be dumped to a server error log (located in $CORADB/log/server directory) as an exception even when you configure that a call stack will not be dumped for any errors. Therefore, the call_stack_dump_activation_list parameter is effective only when call_stack_dump_on_error=no.
If this value is not configured, the default value is "DEFAULT" keyword. This keyword includes below errors. "DEFAULT" keyword can be used together with other error numbers.
| Error number | Error message |
|---|---|
| -2 | Internal system failure: no more specific information is available. |
| -7 | Trying to format disk volume xxx with an incorrect value xxx for number of pages. |
| -13 | An I/O error occurred while reading page xxx of volume xxx. |
| -14 | An I/O error occurred while writing page xxx of volume xxx. |
| -17 | Internal error: fetching deallocated pageid xxx of volume xxx. |
| -19 | Internal error: pageptr = xxx of page xxx of volume xxx is not fixed. |
| -21 | Internal error: unknown sector xxx of volume xxx. |
| -22 | Internal error: unknown page xxx of volume xxx. |
| -45 | Slot xxx on page xxx of volume xxx is allocated to an anchored record. A new record cannot be inserted here. |
| -46 | Internal error: slot xxx on page xxx of volume xxx is not allocated. |
| -48 | Accessing deleted object xxxxxx. |
| -50 | Internal error: relocation record of object xxxxxx may be corrupted. |
| -51 | Internal error: object xxxxxx may be corrupted. |
| -52 | Internal error: object overflow address xxxxxx may be corrupted. |
| -76 | Your transaction (index xxx, xxx@xxxxxx. You are waiting for user(s) xxx to release the page lock. |
| -78 | Internal error: an I/O error occurred while reading logical log page xxx (physical page xxx) of xxx. |
| -79 | Internal error: an I/O error occurred while writing logical log page xxx (physical page xxx) of xxx. |
| -81 | Internal error: logical log page xxx may be corrupted. |
| -90 | Redo logging is always a page level logging operation. A data page pointer must be given as part of the address. |
| -96 | Media recovery may be needed on volume xxx. |
| -97 | Internal error: unable to find log page xxx in log archives. |
| -313 | Object buffer underflow while reading. |
| -314 | Object buffer overflow while writing. |
| -407 | Unknown key xxx referenced in B+tree index {vfid: (xxx, xxx), rt_pgid: xxx, key_type: xxx}. |
| -414 | Unknown class identifier: xxxxxx. |
| -415 | Invalid class identifier: xxxxxx. |
| -416 | Unknown representation identifier: xxx. |
| -417 | Invalid representation identifier: xxx. |
| -583 | Trying to allocate an invalid number (xxx) of pages. |
| -603 | Internal Error: Sector/page table of file VFID xxx|Xxx seems corrupted. |
| -836 | LATCH ON PAGE(xxx|xxx) TIMEDOUT |
| -859 | LATCH ON PAGE(xxx|xxx) ABORTED |
| -890 | Partition failed. |
| -891 | Appropriate partition does not exist. |
| -976 | Internal error: Table size overflow (allocated size: xxx, accessed size: xxx) at file table page xxx|xxx(volume xxx) |
| -1075 | Descending index scan aborted because of lower priority on B+tree with index identifier: (vfid = (xxx, xxx), rt_pgid: xxx). |
The following example shows how to make error numbers only -115 and -116, perform call-stack dump.
call_stack_dump_on_error= nocall_stack_dump_activation_list=-115,-116The following example shows how to make error numbers -115, -116 and "DEFAULT" error numbers, perform call-stack dump.
call_stack_dump_on_error= nocall_stack_dump_activation_list=-115,-116, DEFAULTcall_stack_dump_deactivation_list
Section titled “call_stack_dump_deactivation_list”call_stack_dump_deactivation_list is a parameter to configure a certain error number for which a call stack is not to be dumped when you configure that a call stack will be dumped for any errors. Therefore, the call_stack_dump_deactivation_list parameter is effective only when call_stack_dump_on_error is set to yes.
The following example shows how to configure the parameter so that call stacks will be dumped for any errors, except the ones whose numbers are -115 and -116.
call_stack_dump_on_error= yescall_stack_dump_deactivation_list=-115,-116call_stack_dump_on_error
Section titled “call_stack_dump_on_error”call_stack_dump_on_error is a parameter to configure whether or not to dump a call stack when an error occurs in the database server. If this parameter is set to no, a call stack for any errors is not dumped. If it is set to yes, a call stack for all errors is dumped. The default value is no.
error_log
Section titled “error_log”error_log is a server/client parameter to configure the name of the error log file when an error occurs in the database server. The name of the error log file must be in the form of <database_name>_<date>_<time>.err. However, the naming rule of the error log file does not apply to errors for which the system cannot find the database server information. Therefore, error logs are recorded in the coradb.err file. The error log file coradb.err is stored in the $CORADB/log/server directory.
error_log_level
Section titled “error_log_level”error_log_level is a server parameter to configure an error message to be stored based on severity. There are five different levels which range from WARNING (lowest level), to FATAL (highest level). The inclusion relation in messages is FATAL < ERROR < SYNTAX < NOTIFICATION < WARNING. The default is NOTIFICATION. If severity of error is NOTIFICATION, error messages with NOTIFICATION, SYNTAX, ERROR and FATAL levels are written to the log file.
error_log_warning
Section titled “error_log_warning”error_log_warning is a parameter to configure whether or not error messages with a severity level of WARNING are to be displayed. Its default value is no. For this reason, you must set error_log_warning to yes to store WARNING messages to an error log file.
error_log_size
Section titled “error_log_size”error_log_size is a parameter to configure the maximum number of lines per an error log file. The default value is 512M. If it reaches up to the specified number, the <database_name>_<date>_<time>.err.bak file is created.
Concurrency/lock-related parameters
Section titled “Concurrency/lock-related parameters”The following are parameters related to concurrency control and locks of the database server. The type and value range for each parameter are as follows:
| Parameter name | Type | Default | Min | Max |
|---|---|---|---|---|
| deadlock_detection_interval_in_secs | float | 1.0 | 0.1 | |
| isolation_level | int | 4 | 4 | 6 |
| lock_escalation | int | 100,000 | 5 | |
| lock_timeout | msec | -1(inf) | 0(no wait) | INT_MAX |
| rollback_on_lock_escalation | bool | no |
deadlock_detection_interval_in_secs
Section titled “deadlock_detection_interval_in_secs”deadlock_detection_interval_in_secs is a parameter to configure the interval (in seconds) in which deadlocks are detected for stopped transactions. If a deadlock occurs, CoraDB resolves the problem by rolling back one of the transactions. The default value is 1 second and the minimum value is 0.1 second. This value is rounded up by 0.1 sec. unit. For example, if an input value is 0.12 seconds, the value is rounded up to 0.2 seconds. Note that deadlocks cannot be detected if the detection interval is too long.
isolation_level
Section titled “isolation_level”isolation_level is a parameter to configure the isolation level of a transaction. The higher the isolation level, the less concurrency and the less interruption by other concurrent transactions. The isolation_level parameter can be configured to an integer value from 4 to 6, which represent isolation levels, or character strings. The default value is READ COMMITTED. For details about each isolation level and parameter values, see Transaction isolation level and the following table.
| Isolation level | isolation_level parameter value |
|---|---|
| SERIALIZABLE | "TRAN_SERIALIZABLE" or 6 |
| REPEATABLE READ | "TRAN_REP_CLASS_REP_INSTANCE" or "TRAN_REP_READ" or 5 |
| READ COMMITTED | "TRAN_REP_CLASS_COMMIT_INSTANCE" or "TRAN_READ_COMMITTED" or "TRAN_CURSOR_STABILITY" or 4 |
- TRAN_SERIALIZABLE : This isolation level ensures the highest level of consistency. For details, see SERIALIZABLE isolation level.
- TRAN_REP_READ : This isolation level can incur phantom read. For details, see REPEATABLE READ isolation level.
- TRAN_READ_COMMITTED : This isolation level can incur unrepeatable read. For details, see READ COMMITTED isolation level.
lock_escalation
Section titled “lock_escalation”lock_escalation is a parameter to configure the maximum number of locks permitted before row level locking is extended to table level locking. The default value is 100,000. If the value of the lock_escalation parameter is small, the overhead by memory lock management is small as well; however, the concurrency decreases. On the other hand, if the configured value is large, the overhead is large as well; however, the concurrency increases.
lock_timeout
Section titled “lock_timeout”lock_timeout is a client parameter to configure the lock waiting time. If the lock is not permitted within the specified time period, the given transaction is canceled, and an error message is returned. If the parameter is configured to -1, which is the default value, the waiting time is infinite until the lock is permitted. If it is configured to 0, there is no waiting for locks.
You can set a unit as s, min or h, which stands for seconds, minutes or hours respectively. If you omit the unit, milliseconds(ms) will be applied, and it is rounded up to seconds. For example, 1ms will be 1s, and 1001ms will be 2s.
rollback_on_lock_escalation
Section titled “rollback_on_lock_escalation”It specifies rolling back the transaction or not when the lock escalation occurs. The default is no.
If this parameter is specified with yes, the error log is written without lock escalation on the lock-escalating time and this lock escalation request is failed with rolling back the transaction. If it is specified with no, the lock escalation is performed and the transaction is continued.
When the lock escalation occurs, record locks are transformed into a table lock and lock-releasing time can take long, so other transaction's access to the table can be impossible. However, if you specify the value of lock_escalation parameter(it specifies the number of record locks occurring the lock escalation) bigger, the system can overuse the memory resource.
Logging-related parameters
Section titled “Logging-related parameters”The following are parameters related to logs used for database backup and restore. The types and value range for each parameter are as follows:
| Parameter name | Type | Default | Min | Max |
|---|---|---|---|---|
| adaptive_flush_control | bool | yes | ||
| background_archiving | bool | yes | ||
| checkpoint_every_size | byte | 10,000 × log_page_size | 10 × log_page_size | log_page_size |
| checkpoint_interval | msec | 6min | 1min | 35,791,394min |
| checkpoint_sleep_msecs | msec | 1 | 0 | |
| force_remove_log_archives | bool | yes | ||
| log_buffer_size | byte | 16k × log_page_size | 128 × log_page_size | INT_MAX × log_page_size |
| log_max_archives | int | INT_MAX | 0 | INT_MAX |
| log_trace_flush_time | int | 0 | 0 | INT_MAX |
| max_flush_size_per_second | byte | 10,000 × db_page_size | 1 × db_page_size | INT_MAX × db_page_size |
| remove_log_archive_interval_in_secs | sec | 0 | 0 | |
| sync_on_flush_size | byte | 200 × db_page_size | 1 × db_page_size | INT_MAX × db_page_size |
| ddl_audit_log | bool | no | ||
| ddl_audit_log_size | byte | 10M | 10M | 2G |
adaptive_flush_control
Section titled “adaptive_flush_control”adaptive_flush_control is a parameter used automatically to adjust the flush capacity at every 50 ms depending on the current status of the flushing operation. The default value is yes. That is, this capacity is increased if a large number of INSERT or UPDATE operations are concentrated at a certain point of time and the number of flushed pages reaches the max_flush_size_per_second parameter value; and is decreased otherwise. In the same way, you can distribute the I/O load by adjusting the flush capacity on a regular basis depending on the workload.
background_archiving
Section titled “background_archiving”background_archiving is a parameter used to create temporary archive logs periodically at a specific time. It is useful when balancing disk I/O load which has been caused by archiving logs. The default is yes.
checkpoint_every_size
Section titled “checkpoint_every_size”checkpoint_every_size is a parameter to configure checkpoint interval by log page. You can set a unit as B, K, M, G or T, which stands for bytes, kilobytes(KB), megabytes(MB), gigabytes(GB) or terabytes(TB) respectively. If you omit the unit, bytes will be applied. The default value is 10,000 * log_page_size (156.25M when log_page_size is 16K).
You can distribute disk I/O overload at the checkpoint by specifying lower size in the checkpoint_every_size parameter, especially in the environment where INSERT / UPDATE are heavily loaded at a specific time.
Checkpoint is a job to record every modified page in data buffers to database volumes (disk) at a specific point. Checkpoint can shrink a restore time after the database failure because this makes the transaction logs which have been generated previously than the checkpoint time needless when the restore is processed. However, an efficient checkpoint interval should be properly considered because this job can occur a lot of disk I/O.
checkpoint_interval
Section titled “checkpoint_interval”checkpoint_interval is a parameter to configure execution period of checkpoint. You can set a unit as ms, s, min or h, which stands for milliseconds, seconds, minutes or hours respectively. If you omit the unit, milliseconds(ms) will be applied, and it is rounded up to seconds. For example, 1ms will be 1s, and 1001ms will be 2s. The default value is 6min and the minimum value is 1min.
checkpoint_sleep_msecs
Section titled “checkpoint_sleep_msecs”checkpoint_sleep_msecs is a parameter to let the job which flushes a buffer's data into a disk process slowly. The default is 1 (millisecond).
force_remove_log_archives
Section titled “force_remove_log_archives”force_remove_log_archives is a parameter to configure whether to allow the deletion of the files other than the recent log archive files whose number is specified by log_max_archives. The default value is yes.
If the value is set to yes, the files will be deleted other than the recent log archive files for which the number is specified by log_max_archives.
If it is set to no, the log archive files will not be deleted. Exceptionally.
log_buffer_size
Section titled “log_buffer_size”log_buffer_size is a parameter to configure the size of log buffer to be cached in the memory. You can set a unit as B, K, M, G or T, which stands for bytes, kilobytes(KB), megabytes(MB), gigabytes(GB) or terabytes(TB) respectively. If you omit the unit, bytes will be applied. The default value is 16k * log_page_size (256M when log_page_size is 16K).
If the value of the log_buffer_size parameter is large, performance can be improved (due to the decrease in disk I/O) in an environment where transactions are long and numerous. Moreover, CoraDB Multiversion Concurrency Control system relies on log to access previous row versions and to vacuum invisible versions from database. It is recommended to configure an appropriate value considering the memory size and operations of the system where CoraDB is installed.
- Required memory size = the size of log buffer (log_buffer_size)
log_max_archives
Section titled “log_max_archives”log_max_archives is a parameter to configure the maximum number of archive log files. The minimum value is 0 and default value is INT_MAX (2,147,483,647). Its operations can differ depending on the configuration of force_remove_log_archives. For example, when log_max_archives is 3 and force_remove_log_archives is yes in the coradb.conf file, the most recent three archive log files are recorded and when a fourth archiving log file is generated, the oldest archive log file is automatically deleted; the information about the deleted archive logs are recorded in the *_lginf file.
However, if an active transaction still refers to an existing archive log file, the archive log file will not be deleted. That is, if a transaction starts at the point that the first archive log file is generated, and it is still active until the fifth archive log is generated, the first archive log file cannot be deleted.
Also, if the information of archive logs is not applied to database volumes, these are not deleted. (Archive logs after which a checkpoint has occurred keep the information of modified pages of a data buffer; therefore, they are required to restore a database.)
If you change the value of log_max_archives dynamically during database operation, changed value will be applied when a new log archive file is created. For example, if you change this value from 10 to 5, old 5 files will be deleted when a new log archive file is created.
log_trace_flush_time
Section titled “log_trace_flush_time”When the log flushing time takes more time than the time you set in this parameter, this event is recorded in the log of the database server.
The example of written information is as below.
03/18/14 10:20:45.889 - LOG_FLUSH_THREAD_WAIT total flush count: 1 page(s) total flush time: 310 ms time waiting for log writer: 308 ms last log writer info time spent by log writer: 308 ms- LOG_FLUSH_THREAD_WAIT: Event name
- Total flush count: The number of flushed pages when the event occurs
- Total flush time: Total spent time when the log is flushed
- Time waiting for log writer: The time LFT(Log Flushing Thread) has been waiting for LWT(Log Writer Thread)
- Last log writer info
- DBA@cdbs037.coraclient_name(pid)>
- Time spent by log writer: Time spend by LWT measured in LWT; in general, this value is the same as the value of "time waiting for log writer")
max_flush_size_per_second
Section titled “max_flush_size_per_second”max_flush_size_per_second is a parameter to configure the maximum flush capacity when the flushing operation is performed from a buffer to a disk. You can set a unit as B, K, M, G or T, which stands for bytes, kilobytes(KB), megabytes(MB), gigabytes(GB) or terabytes(TB) respectively. If you omit the unit, bytes will be applied. The default value is 10,000 * db_page_size (156.25M when db_page_size is 16K). That is, you can prevent concentration of I/O load at a certain point of time by configuring this parameter to control the maximum flush capacity per second.
If a large number of INSERT or UPDATE operations are concentrated at a certain point of time, and the flush capacity reaches the maximum capacity set by this parameter, only log pages are flushed to the disk, and data pages are no longer flushed. Therefore, you must set an appropriate value for this parameter considering the workload of the service environment.
remove_log_archive_interval_in_secs
Section titled “remove_log_archive_interval_in_secs”Archive logs which exceed the specified number in the log_max_archives are removed when checkpoint occurs. By the way, many archive logs can be removed at once frequently after being piled up when jobs such as data migration or big data batch processing are performed. If files are removed at once like these, I/O overhead of database server is rapidly risen; therefore, we need to decrease this burden.
remove_log_archive_interval_in_secs parameter lets archive logs delete slowly to shrink this burden. The default is 0 (second). In the situations which jobs like big data batch processing occur frequently, it is recommended to set the deletion interval as a 60 seconds if the disk space is enough.
sync_on_flush_size
Section titled “sync_on_flush_size”sync_on_flush_size is a parameter to configure the interval in pages between after data and log pages are flushed from buffer and before they are synchronized with FILE I/O of operating system. The default value is 200 * db_page_size (3.125M when db_page_size is 16K). That is, the CoraDB Server performs synchronization with the FILE I/O of the operating system whenever 200 pages have been flushed. This is also a parameter related to I/O load.
ddl_audit_log
Section titled “ddl_audit_log”ddl_audit_log is a parameter to turn on/off DDL logging facility. The default value is no. If this value is set to yes, all DDL executed will be logged into the logfile. The path of log files is $CORADB/log/ddl_audit, and refer to :doc:/admin/ddl_audit for each DDL AUDIT log file name and description of log files in detail.
ddl_audit_log_size
Section titled “ddl_audit_log_size”ddl_audit_log_size specifies the maximum size of the DDL AUDIT log file. If the ddl audit log file is larger than the specified size, that ddl audit log file is backed up with the name of .bak appended to the ddl audit log file, and new recording will be started with the file from the beginning of the file. You can set the size with a size unit as B, K, M, or G, which stand for bytes, kilobytes (KB), megabytes (MB), and gigabytes (GB) respectively. If you omit the size unit, bytes will be applied. The default is 10M, and it can be set up to 2G.
Transaction processing-related parameters
Section titled “Transaction processing-related parameters”The following are parameters for improving transaction commit performance. The type and value range for each parameter are as follows:
| Parameter name | Type | Default | Min | Max |
|---|---|---|---|---|
| async_commit | bool | no | ||
| group_commit_interval_in_msecs | msec | 0 | 0 |
async_commit
Section titled “async_commit”async_commit is a parameter used to activate the asynchronous commit functionality. If the parameter is set to no, which is the default value, the asynchronous commit is not performed; if it is set to yes, the asynchronous commit is executed. The asynchronous commit is a functionality that improves commit performance by completing the commit for the client before commit logs are flushed on the disk and having the log flush thread (LFT) perform log flushing in the background. Note that already committed transactions cannot be restored if a failure occurs on the database server before log flushing is performed.
group_commit_interval_in_msecs
Section titled “group_commit_interval_in_msecs”group_commit_interval_in_msecs is a parameter to configure the interval (in milliseconds), at which the group commit is to be performed. If the parameter is configured to 0, which is the default value, the group commit is not performed. The group commit is a functionality that improves commit performance by combining multiple commits that occurred in the specified time period into a group so that commit logs are flushed on the disk at once.