Note
This parameter was introduced in OceanBase Database V4.3.4.
Description
The shared_log_retention parameter specifies the retention period of shared log files in shared storage mode.
Applicability
This parameter applies only to OceanBase Database in shared storage (Shared-Storage, SS) mode.
Privilege requirements
Query the parameter
The
systenant and all user tenants can execute theSHOW PARAMETERSstatement or query theGV$OB_PARAMETERSview to obtain the value of this parameter.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 execute the ALTER SYSTEM SET statement to modify this parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
When a tenant is deleted, its transaction log files in shared storage 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';