Read Parameters of the Standby Node in a Distributed System
enable_standby_read
Parameter description: Specifies whether to enable the read function of the standby node for a session. This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.
Value range: Boolean
- on indicates that the read function of the standby node in a distributed system is enabled for the session.
- off indicates that the read function of the standby node in a distributed system is disabled for the session.
Default value: off
- This function can be enabled only in GTM-free mode, non-transaction block, and hot-standby mode.
- This parameter can be set only at the session level and cannot be set using gs_guc.
- If this parameter is set at a non-session level (for example, manually 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 background threads such as autovacuum and WorkloadMonitor. As a result, DDL and DML operations are affected and errors are reported.
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. This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from –1 to INT_MAX. The unit is ms. –1 indicates that the difference between the primary and standby nodes does not need to be verified when data is read from the standby node. 0 indicates that data is read from the standby node only when there is no difference between the primary and standby nodes.
Default value: 10000000
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. This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.
Value range: an integer ranging from –1 to INT_MAX. The unit is ms. The value –1 indicates that the system RTO verification is not required when data is read from the standby node. The value 0 indicates that data is read from the standby node only when the RTO of at least one standby node is 0.
Default value: 60000
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