Note
- For OceanBase Database V4.3.x, this parameter was introduced in OceanBase Database V4.3.1.
- For OceanBase Database V4.2.x, this parameter was introduced in OceanBase Database V4.2.3.
Description
syslog_compress_func specifies the compression algorithm for system logs.
When compression is enabled, the observer.log, rootservice.log, election.log, and trace.log files whose file names are suffixed with timestamps are compressed, and files whose file names are suffixed with .wf are not compressed.
Limitations
Query the parameter
In the
systenant or a user tenant, you can execute theSHOW PARAMETERSstatement to query the parameter or query theGV$OB_PARAMETERSview for the parameter.Modify the parameter
You can modify the parameter only in the
systenant.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | none, which specifies not to compress system log files. |
| Value range | none, zstd_1.0, and zstd_1.3.8 |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
After you specify the
syslog_compress_funcparameter, log compression does not start immediately. Instead, it starts from the earliest log file when the number of logs or disk usage reaches the upper limit. This way, more uncompressed log files are retained, which helps you analyze problems based on logs.After you modify the
syslog_compress_funcparameter, subsequent logs will be compressed by using the specified algorithm. Existing compressed log files are not modified. When you delete log files, the system checks only the timestamps while ignoring file name extensions.The relationships between the
syslog_compress_funcparameter and the syslog_file_uncompressed_count, syslog_disk_size, and max_syslog_file_count parameters are as follows:When
syslog_compress_func =noneis specified:- The
syslog_file_uncompressed_countparameter is invalid. - The
syslog_disk_sizeandmax_syslog_file_countparameters control the maximum number and size of log files.
- The
When
syslog_compress_func !=noneis specified:- The
max_syslog_file_countparameter is invalid. - When the number of log files exceeds the value of
syslog_file_uncompressed_count, redundant log files will be compressed. When the total size of log files approaches the value ofsyslog_disk_size, the earliest log files are deleted.
- The
Examples
Set the compression algorithm for system logs to zstd_1.3.8.
obclient> ALTER SYSTEM SET syslog_compress_func = 'zstd_1.3.8';