Help Center/ GaussDB/ Developer Guide(Centralized_8.x)/ Configuring GUC Parameters/ GUC Parameters/ Replication Parameters of Two Database Instances
Updated on 2024-06-03 GMT+08:00

Replication Parameters of Two Database Instances

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.

This is a USERSET parameter. Set it based on method 3 provided in Table 1.

Value range: an integer ranging from 0 to 2147483647

Default value: 0

stream_cluster_run_mode

Parameter description: Specifies whether a DN is in the primary or standby instance in dual-instance streaming DR scenarios. For single-instance scenarios, the primary instance is used by default.

This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: enumerated values

  • cluster_primary indicates that the node is in the primary instance.
  • cluster_standby indicates that the node is in the standby instance.

Default value: cluster_primary

enable_roach_standby_cluster

Parameter description: Sets the standby database instances to read-only in dual-database instance mode. Only the sysadmin user can access this parameter.

This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

  • on indicates that the read-only mode is enabled for the standby database instances.
  • off indicates that 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

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.

This is a SIGHUP parameter. Set it based on instructions provided in Table 2.

Value range: enumerated values.

  • none indicates that there is no process.
  • failover indicates that the DR database instance is being upgraded.
  • switchover_promote indicates the process of upgrading the DR database instance to the primary one during the primary/standby database instance switchover according to a streaming replication-based remote DR solution.
  • switchover_demote indicates the process of demoting the primary database instance to the DR one during the primary/standby database instance switchover according to the streaming replication-based remote DR solution.
  • dorado_failover indicates the process of upgrading the DR database instance to the primary one according to the intra-city dual-DC HA solution.
  • dorado_switchover_demote indicates the process of demoting the primary database instance to the DR one during the primary/standby database instance switchover according to the intra-city dual-DC HA solution.
  • dorado_failover_abnormal indicates the process of promoting the DR 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 indicates the process of promoting the intra-city dual-DC standby database instance to the intra-city dual-DC primary database instance (also the remote DR database instance) 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 indicates the process of promoting the intra-city dual-DC standby database instance to the intra-city dual-DC primary database instance (also the remote DR database instance) 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 remote DR database instance) is faulty.

Default value: none