Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
DataArts Fabric
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ GaussDB/ Developer Guide(Distributed_V2.0-8.x)/ Configuring GUC Parameters/ GUC Parameters/ Read Parameters of the Standby Node in a Distributed System

Read Parameters of the Standby Node in a Distributed System

Updated on 2025-05-29 GMT+08:00

enable_standby_read

Parameter description: Specifies whether to enable the read function of the standby node for a session.

NOTICE:

This function can be enabled only in GTM-free, GTM-lite, non-standby cluster for DR, non-transaction block, and hot-standby modes.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The read function of the standby node in a distributed system is enabled for the session.
  • off: The read function of the standby node in a distributed system is disabled for the session.

Default value: off

Setting method: This parameter is a USERSET parameter and can be set only at the session level (enable_standby_read is set to on). It cannot be set using gs_guc set/reload.

Setting suggestion: This parameter cannot be set using gs_guc. If you need to query the standby node, enable it in the session.

Risks and impacts of improper settings: If this parameter is set at a non-session level (for example, enabling this parameter in the configuration file), the cluster cannot be started when a parameter conflict occurs. If no parameter conflict occurs, the read function of the standby node in a distributed system is also enabled for backend threads such as autovacuum and WorkloadMonitor. As a result, DDL and DML operations are affected and errors are reported.

enable_direct_standby_datanodes

Parameter description: Specifies whether to enable the EXECUTE DIRECT ON extension capability for a session. If this parameter is enabled, the EXECUTE DIRECT ON statement can be used to connect to any standby DN or all standby DNs in a shard to execute queries. For details about the execute direct on syntax, see "SQL Reference > SQL Syntax > E > EXECUTE DIRECT" in Developer Guide.

NOTICE:
  • This function can be enabled only in GTM-free mode, non-transaction block, and hot-standby mode.
  • In the same session, an error is reported if enable_direct_standby_datanodes is set to on after enable_standby_read is set to on. An error is also reported if enable_standby_read is set to on after enable_direct_standby_datanodes is set to on.
  • After this parameter is enabled, the current session is read-only, and DDL and DML jobs are affected and errors are reported.
  • After this parameter is enabled, you can use EXECUTE DIRECT ON to query only system DFX information such as system views, system functions, and system catalogs. Common user tables cannot be queried.
  • After the enable_direct_standby_datanodes parameter is enabled, EXECUTE DIRECT ON supports distributed standby node query. Before using this function during the upgrade, ensure that the CN and DN instance processes have been replaced with the latest binary files. Otherwise, packet verification fails and an error is reported.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The EXECUTE DIRECT ON extension capability is enabled for the session.
  • off: The EXECUTE DIRECT ON extension capability is disabled for the session.

Default value: off

Setting method: This parameter is a USERSET parameter and can be set only at the session level (enable_direct_standby_datanodes is set to on). It cannot be set using gs_guc set/reload.

Setting suggestion: This parameter is used to specify whether to enable EXECUTE DIRECT ON to perform the connection behavior in the distributed standby node read scenario. This function is mainly used for WDR, database test, and O&M. You are advised not to enable this function in other scenarios. This parameter cannot be set using gs_guc. If you need to query the standby node, enable it in the session.

Risks and impacts of improper settings: If this parameter is enabled in the configuration file, the database node cannot be started.

standby_read_delay

Parameter description: Specifies the maximum difference between the primary and standby nodes when data is read from the standby node. If the difference exceeds the value of this parameter, data cannot be read from the standby node.

Parameter type: integer.

Unit: ms

Value range: –1 to 2147483647

  • –1: The difference between the primary and standby nodes does not need to be verified when data is read from the standby node.
  • 0: Data can be read from the standby node only when there is no difference between the primary and standby nodes.

Default value: 10000000

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if this parameter is set to 86400 without a unit, it indicates 86400 ms. If this parameter is set to 1d, it indicates 1 day. The unit must be ms, s, min, h, or d if required.

Setting suggestion: Set this parameter based on service requirements.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

standby_read_rto

Parameter description: Specifies the maximum RTO of the system when data is read from the standby node. If the RTO exceeds the value of this parameter, data cannot be read from the standby node.

Parameter type: integer.

Unit: ms

Value range: –1 to 2147483647

  • –1: The system RTO does not need to be verified when data is read from the standby node.
  • 0: Data can be read from the standby node only when the RTO of at least one standby node is 0.

Default value: 60000

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if this parameter is set to 86400 without a unit, it indicates 86400 ms. If this parameter is set to 1d, it indicates 1 day. The unit must be ms, s, min, h, or d if required.

Setting suggestion: Set this parameter based on service requirements.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback