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