Note
This parameter was introduced in OceanBase Database V4.2.4.
Description
audit_log_compression specifies the algorithm for compressing audit logs.
Applicability
This parameter is applicable to only OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the audit feature.
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 use the
ALTER SYSTEM SETstatement to modify the parameter in thesystenant or a user tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | NONE, which specifies not to compress audit logs. |
| Value range |
|
| 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
When the size of a file exceeds the value of audit_log_rotate_on_size, the file will be archived. This parameter specifies whether to compress the archived file.
Examples
Set the algorithm for compressing audit logs to ZSTD.
obclient> ALTER SYSTEM SET audit_log_compression='ZSTD';