Note
For V4.2.0, this parameter is available starting with V4.2.0.
Description
standby_db_preferred_upstream_log_region specifies the preferred region for log synchronization for a standby tenant in a physical standby database scenario.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | The default value is an empty string, indicating that the standby tenant synchronizes logs according to the default strategy for selecting machines and obtaining logs. |
| Value range | The value is the name of a region in the OceanBase cluster. |
| 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
After you set the
standby_db_preferred_upstream_log_regionparameter to specify the preferred region for log synchronization for a standby tenant, the standby tenant will prefer to synchronize logs from machines in the specified region. To ensure high availability, if the standby tenant cannot obtain logs from all machines in the specified region, the system will switch to other regions according to a certain strategy to synchronize logs and attempt to switch back to the specified region within a period of time to continue synchronizing logs.This parameter supports dynamic adjustment. When the standby tenant detects that the specified region for log synchronization has changed, the system will adjust the priority in real time to complete the switch of machines.
Examples
Set the preferred region for log synchronization for a standby tenant in the
systenant of the cluster where the standby tenant is located.obclient> ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING' tenant = 'restore_mysql_tenant';Set the preferred region for log synchronization for the standby tenant.
obclient> ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING';