Overview
archive_lag_target specifies the maximum allowed time lag for log archiving of a tenant.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Time |
| Default Value | 120s |
| Value range | [0ms, 7200s] |
| Modifiable | Yes, you can use the following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
For physical standby database scenarios based on log archiving, you can adjust the value of the primary tenant's parameter
archive_lag_targetaccording to the synchronization requirements of the standby tenants. It can be set to half of the latency requirement of the standby tenants. After adjustment, it will affect all standby tenants under that primary tenant.For other scenarios, such as network-based physical standby database scenarios, it is recommended to adjust the value of the primary tenant's parameter
archive_lag_targetbased on the tenant's write load and requirements for archiving timeliness. Subject to meeting timeliness requirements, ensure that a single log stream generates at least one log file of 64 MB within the period set byarchive_lag_target.Note
The archive file is homogeneous with the log files of OceanBase AI Database. A single log file can be completely uploaded as a single Normal-type archive file.
Configuration example
Set the tenant log archiving delay to 120 seconds.
obclient> ALTER SYSTEM SET archive_lag_target ='120s';