Note
- Due to internal optimization, for V5.x versions, this parameter has been changed from a cluster-level setting to a tenant-level setting starting from V5.0.1 (for V4.4.2, starting from V4.4.2 BP1).
- This parameter is available starting with V1.4.
Description
schema_history_expire_time specifies the retention period for multi-version historical data of schemas and the retention period for tenants that are to be deleted later.
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
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Type | Time |
| Default value | 7d, where d indicates days
NoteStarting from V4.0.0, the default value of this parameter is changed from 30d to 7d. |
| Value range | [1m, 30d]
NoteStarting from V4.0.0, the value range of this parameter is changed from [1m, 365d] to [1m, 30d]. |
| 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. |
Examples
Set the retention period for schema multi-version history data to 7 days.
obclient> ALTER SYSTEM SET schema_history_expire_time = '7d';
When this parameter is set to 7d, schema multi-version history data generated in the last 7 days is retained. Expired and unused schema multi-version history data is recycled.
