Note
This parameter is available starting with V4.3.4.
Description
shared_log_retention specifies the retention period of shared log files in shared storage mode.
Applicability
This parameter is applicable only to OceanBase Database in shared storage (SS) mode.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Time |
| Default value | 1d |
| Value range | [0s,7d] |
| 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 a tenant is deleted, the transaction log files on the shared storage of the tenant are immediately deleted.
Examples
In SS mode, set the retention period of shared log files for all tenants to 7 days.
obclient> ALTER SYSTEM SET shared_log_retention= '7d' TENANT='ALL';In SS mode, set the retention period of shared log files for the MySQL user tenant to 24 hours.
obclient> ALTER SYSTEM SET shared_log_retention= '24h' TENANT='MySQL';
