Note
This parameter is available starting with V1.4.
Description
schema_history_expire_time specifies the time range for which full metadata history data is retained 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
Only the
systenant can modify this parameter. User tenants cannot 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 full metadata history data to 7 days.
obclient> ALTER SYSTEM SET schema_history_expire_time = '7d';
When this parameter is set to 7d, full metadata history data generated in the last 7 days is retained. The metadata history data generated before that can be recycled by the metadata history data recycling service. For more information about the metadata history data recycling service, see schema_history_recycle_interval.
