Help Center> GaussDB> Centralized_3.x> Configuring Running Parameters> GUC Parameters> Replication Parameters of Two Database Instances
Updated on 2024-05-07 GMT+08:00

Replication Parameters of Two Database Instances

RepOriginId

Parameter description: This parameter is a session-level GUC parameter. In bidirectional logical replication, set it to a non-zero value to avoid infinite data replication.

This parameter 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 DN is in the primary instance by default.

This parameter 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 users with the sysadmin permission can access this parameter.

This parameter 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 for the streaming replication-based remote DR solution or intra-city dual-center HA solution.

This parameter is a SIGHUP parameter. Set it based on 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 database instance during the primary/standby database instance switchover.
  • switchover_demote indicates the process of demoting the primary database instance to the DR database instance during the primary/standby database instance switchover.
  • dorado_failover indicates the process of promoting Dorado DR database instance.
  • dorado_switchover_demote indicates the process of demoting the primary database instance to the DR database instance during the primary/standby instance of Dorado database switchover.
  • dorado_failover_abnormal indicates the process of promoting the DR database instance to the primary instance when the shared disk of the primary instance in Dorado database is faulty.

Default value: none