Note
For V4.2.0, this parameter is available starting with V4.2.0.
Description
archive_lag_target specifies the maximum allowed delay for log archiving.
Privilege requirements
Query the parameter
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Time |
| Default value | 120s |
| Value range | [0ms, 7200s] |
| 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
In a physical standby database scenario based on log archiving, you can adjust the value of the
archive_lag_targetparameter of the primary tenant based on the synchronization requirements of the standby tenant. Set the value to half of the delay requirement of the standby tenant. After the value is adjusted, it will affect all standby tenants under the primary tenant.In other scenarios, such as a physical standby database scenario based on network, we recommend that you adjust the value of the
archive_lag_targetparameter of the primary tenant based on the write pressure of the tenant and the requirements for the timeliness of archiving. If the timeliness requirement is met, ensure that at least one 64 MB log file is generated within the cycle specified byarchive_lag_targetfor each log stream.Note
Archived files are the same as log files in OceanBase Database. A log file can be uploaded as a complete Normal type archived file.
Examples
Set the maximum allowed delay for log archiving to 120s.
obclient> ALTER SYSTEM SET archive_lag_target ='120s';