Overview
standby_db_preferred_upstream_log_region specifies the preferred region for upstream log synchronization in a physical standby database scenario.
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 | String |
| Default Value | The default value is "". This means that the standby tenant synchronizes logs by selecting a machine and obtaining logs according to the default strategy. |
| Value range | Values of Region in OceanBase AI Database Cluster |
| 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
After you specify a region for the standby tenant to synchronize upstream logs from via the
standby_db_preferred_upstream_log_regionparameter, the standby tenant will preferentially synchronize logs from the server in that region. To ensure high availability, if the standby tenant cannot obtain logs from all servers in the specified region, the system will switch to another region for log synchronization according to a predefined strategy and will attempt to switch back to the specified region after a period of time to resume log synchronization.This parameter supports dynamic adjustment. When the standby tenant detects a change in the region specified for log synchronization, the system adjusts the priority in real time to complete the server switchover.
Configuration example
Set the preferred region for standby tenant log synchronization under the
systenant of the cluster where the standby tenant resides.obclient> ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING' tenant = 'restore_mysql_tenant';The preferred region for log synchronization of the current tenant set by the standby tenant
obclient> ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING';