Note
This parameter is available starting with V4.2.0.
Description
archive_lag_target specifies the maximum delay allowed for log archiving.
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 | 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
For a physical standby database based on log archiving, you can set the
archive_lag_targetparameter of the primary tenant to half of the maximum delay allowed for the standby tenant. After the parameter is set, all standby tenants under the primary tenant are affected.For other scenarios, such as a physical standby database based on network, we recommend that you set the
archive_lag_targetparameter of the primary tenant based on the write pressure of the tenant and the required archiving timeliness. If the timeliness requirement is met, ensure that a log file of at least 64 MB is generated within the cycle specified by thearchive_lag_targetparameter.Note
Log files and archive files are in the same format. A log file can be uploaded as a Normal archive file.
Examples
Set the maximum delay allowed for log archiving to 120s.
obclient> ALTER SYSTEM SET archive_lag_target ='120s';