Replication Parameters of Two Database Instances
enable_roach_standby_cluster
Parameter description: Specifies whether the standby database instances are read-only in dual-database instance mode. Only the SYSADMIN user can access this parameter.
Parameter type: Boolean.
Unit: none
Value range:
- on: The read-only mode is enabled for the standby database instances.
- off: The read-only mode is disabled for the standby database instances. In this case, the standby database instances can be read and written.
Default value: off
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter is used for backup and restoration. You are advised not to change the value.
Risks and impacts of improper settings: Changing the value of this parameter may cause unexpected results in the database. Retain the default value.
RepOriginId
Parameter description: This is a session-level GUC parameter. In bidirectional logical replication, set it to a non-zero value to avoid infinite data replication.
Parameter type: integer.
Unit: none
Value range: 0 to 2147483647
Default value: 0
Setting method: This is a USERSET parameter. Set it based on method 3 provided in Table 2.
Setting suggestion: In two-way logical replication scenarios, set this parameter to a non-zero value.
Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.
stream_cluster_run_mode
Parameter description: Specifies whether a DN is in the primary or standby instance in dual-instance streaming DR scenarios.
Value type: enumerated type.
Unit: none
Value range:
- cluster_primary: The node is in the primary instance.
- cluster_standby: The node is in the standby instance.
Default value: cluster_primary
Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter specifies the status of a DR instance. It is used in internal processes and can be read by users. You are advised not to modify this parameter.
Risks and impacts of improper settings: Manual modification will cause standby database instances to be abnormal.
hadr_process_type
Parameter description: Specifies a process ID of a streaming replication-based remote DR solution, an intra-city dual-DC HA solution, or an intra-city dual-DC HA solution that supports streaming replication-based remote DR.
Value type: enumerated type.
Unit: none
Value range:
- none: There is no process.
- failover: The database instance for DR is switched to primary.
- switchover_promote: The process of upgrading the standby database instance to the primary one during the primary/standby database instance switchover according to a streaming replication-based remote DR solution.
- switchover_demote: The process of demoting the primary database instance to the standby one during the primary/standby database instance switchover according to the streaming replication-based remote DR solution.
- dorado_failover: The process of upgrading the standby database instance to the primary one according to the intra-city dual-DC HA solution.
- dorado_switchover_demote: The process of switching the primary database instance to the standby one during the primary/standby database instance switchover according to the intra-city dual-DC HA solution.
- dorado_failover_abnormal: The process of switching the standby database instance to the primary one when the shared disk of the primary database instance in the intra-city dual-DC HA solution is faulty.
- dorado_failover_in_standby_stream: The process of promoting the intra-city dual-DC standby database instance to the intra-city dual-DC primary database instance (also the standby database instance for remote DR) when the remote database instance in the intra-city dual-DC HA solution that supports streaming replication-based remote DR is the remote DR primary database instance.
- dorado_failover_abnormal_in_standby_stream: The process of switching the intra-city dual-DC standby database instance to the intra-city dual-DC primary database instance (also the standby database instance for remote DR) when the remote database instance in the intra-city dual-DC HA solution that supports streaming replication-based remote DR is the remote DR primary database instance, and the shared disk of the intra-city dual-DC primary database instance (also the standby database instance for remote DR) is faulty.
- hadr_process_recovery_pause: The replay is paused after the standby database instance enters the production mode. This parameter is applicable only to the production mode.
- hadr_process_force_truncate:The TRUNCATE status of the standby database instance logs when the standby database instance fails to be put into production. This parameter is applicable only when the standby database instance fails to be put into production and is promoted to primary. In this case, the logs of the standby database instance are still not replayed.
Default value: none
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter specifies the status of a standby database instance for DR. It is used in internal processes and can be read by users. You are advised not to modify this parameter.
Risks and impacts of improper settings: Manual modification will cause standby database instances to be abnormal.
cluster_name
Parameter description: Specifies the name of the current database instance.

Do not set the database instance name cluster_name to "invalid_cluster_uuid".
Parameter type: string.
Unit: none
Value range: valid instance name.
Default value: ""
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter is used in the DR process. The standby database instance for DR identifies the database instance based on this parameter. You are advised not to modify this parameter.
Risks and impacts of improper settings: The manual modification may cause DR function exceptions.
hadr_primary_cluster_name
Parameter description: Specifies the name of the current primary database instance in DR. It is used to identify the primary database instance in the remote streaming DR deployment where one primary database instance connects to two standby database instances.

If hadr_primary_cluster_name of the main standby database instance in streaming DR mode is set to invalid_cluster_uuid, log synchronization with the primary database instance will not be started, and the standby database instance will remain disconnected.
Parameter type: string.
Unit: none
Value range: valid instance name.
Default value: ""
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter identifies a standby database instance for DR. It is used in DR processes and can be read by users. You are advised not to modify this parameter.
Risks and impacts of improper settings: The manual modification may cause DR function exceptions.
hadr_standby_cluster_num
Parameter description: Specifies the number of standby database instances for streaming DR.
Parameter type: integer.
Unit: none
Value range: 0 to 2147483647
Default value: 0
Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Setting suggestion: This parameter specifies the status of a standby database instance for DR. It is used in DR processes and can be read by users. You are advised not to modify this parameter.
Risks and impacts of improper settings: The manual modification may cause DR function exceptions.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot