HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Sending Server

max_wal_senders

Parameter description: Specifies the maximum number of simultaneously running WAL sender processes. The value cannot be greater than or equal to that of max_connections.

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

img NOTICE: wal_level must be set to archive or hot_standby to allow the connection from standby servers.

Value range: an integer ranging from 0 to 1024. The recommended value range is 8 to 100.

img NOTE: This parameter can be set to 0 only when a single DN is used and there is no primary/standby instance.

Default value: 16

wal_keep_segments

Parameter description: Specifies the number of Xlog file segments. Specifies the minimum number of transaction log files stored in the pg_xlog directory. The standby server obtains log files from the primary server for streaming replication.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: an integer ranging from 2 to INT_MAX

Default value: 16

Setting suggestions:

  • During WAL archiving or recovery from a checkpoint on the server, the system may retain more log files than the number specified by wal_keep_segments.
  • If this parameter is set to an excessively small value, a transaction log may have been overwritten by a new transaction before requested by the standby server. As a result, the request fails and the connection between the primary and standby servers is terminated.
  • If the HA system uses asynchronous transmission, increase the value of wal_keep_segments when data greater than 4 GB is continuously imported in COPY mode. Take T6000 board as an example. If the data to be imported reaches 50 GB, you are advised to set this parameter to 1000. You can dynamically restore the setting of this parameter after data import is complete and the WAL synchronization is proper.

wal_sender_timeout

Parameter description: Specifies the maximum duration that the sending server waits for the WAL reception in the receiver.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

img NOTICE:

  • If the data volume on the primary server is huge, the value of this parameter must be increased for the database rebuilding on a standby server. For example, if the data volume on the primary server reaches 500 GB, you are advised to set this parameter to 600 seconds.
  • This parameter cannot be set to a value larger than the value of wal_receiver_timeout or the timeout parameter for database rebuilding.

Value range: an integer ranging from 0 to INT_MAX. The unit is ms.

Default value: 6s

logical_sender_timeout

Parameter description: Sets the maximum wait time for this end to wait for logs to be received by the logical log receiver.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Integer, 0 ~ INT_MAX, in milliseconds (ms).

Default value: 30s

max_replication_slots

Parameter description: Specifies the number of log replication slots in the primary server.

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

Value range: an integer ranging from 0 to 1024. The recommended value range is 8 to 100.

Default value: 8

Setting suggestions:

When HA replication, , and logical decoding are used, you are advised to set this parameter to: Number of current physical replication slots + Number of required logical replication slots. If the actual value is smaller than the recommended value, these functions may be unavailable or abnormal.

  • Physical replication slots provide an automatic method to ensure that Xlogs are not removed from a primary node before they are received by all the standby nodes and secondary nodes. That is, physical replication slots are used to support primary/standby HA. The number of physical replication slots required by a database is equal to the ratio of standby and secondary nodes to the primary node. For example, if an HA database has 1 primary node, 1 standby node, and 1 secondary node, the number of required physical replication slots will be 2. If an HA database has 1 primary node and 3 standby nodes, the number of required physical replication slots will be 3.
  • Currently, primary/standby/secondary deployment is not supported by default.
  • Plan the number of logical replication slots as follows:
    • A logical replication slot can carry changes of only one database for decoding. If multiple databases are involved, create multiple logical replication slots.
    • If logical replication is needed by multiple target databases, create multiple logical replication slots in the source database. Each logical replication slot corresponds to one logical replication link.

enable_slot_log

Parameter description: Specifies whether to enable primary/standby synchronization for logical replication slots.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Boolean

  • on indicates that primary/standby synchronization is enabled for logical replication slots.
  • off indicates that primary/standby synchronization is disabled for logical replication slots.

Default value: off

logical_decode_options_default

Parameter description: Specifies the global default value for unspecified decoding options when logical decoding is initiated.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Currently support to specify logical decode options include: parallel-decode-num, parallel-queue-size, max-txn-in-memory, max-reorderbuffer-in-memory, exclude-users. For the meaning of the options, please refer to Example Logic Replication Code.

Value range: A comma-separated key=value string, e.g., 'parallel-decode-num=4,parallel-queue-size=128,exclude-users=userA'. Where the empty string indicates that the default values hard-coded using the program are used.

Default value: ""

max_changes_in_memory

Parameter description: Specifies the maximum number of DML statements cached in memory for a single transaction during logical decoding.

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

Value range: an integer ranging from 1 to 2147483647

Default value: 4096

max_cached_tuplebufs

Parameter description: Specifies the upper limit of the total tuple information cached in the memory during logical decoding. You are advised to set this parameter to a value greater than or equal to twice of max_changes_in_memory.

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

Value range: an integer ranging from 1 to 2147483647

Default value: 8192

enable_wal_shipping_compression

Parameter description: Specifies whether to enable cross-database instance log compression in streaming DR mode.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

img NOTICE: This parameter applies only to a pair of walsender and walreceiver for cross-database instance transmission in streaming DR and is configured on the primary database instance.

Value range: Boolean

  • true indicates that cross-database instance log compression is enabled for streaming DR.
  • false indicates that cross-database instance log compression is disabled for streaming DR.

Default value: false

repl_auth_mode

Parameter description: This parameter sets the verification mode for primary and standby nodes replication and standby rebuild.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

img NOTICE:

  • If UUID authentication is enabled on the host and the repl_uuid authentication code is configured with a non-empty string, then the primary and standby nodes need to be enabled and configured with the same repl_uuid authentication code, otherwise primary and standby log replication and standby nodes rebuild requests will be rejected by the host.
  • This parameter supports SIGHUP to dynamically load new values. After the modification, it does not affect the primary and standby nodes that have already been established, and it takes effect for subsequent primary and standby nodes replication requests and primary and standby nodes rebuild requests.
  • Supports the verification of standby rebuild under the Quorum and DCF protocols; supports the verification of primary and standby nodes replication under the Quorum protocol; does not support the verification of primary and standby nodes replication under the DCF protocol.
  • The UUID verification function is mainly to prevent data crosstalk and pollution caused by misconnection between the master and the standby, and is not used for security purposes.
  • This parameter does not support automatic synchronization between master and backup.

Value range: Enumeration type

  • off disables UUID authentication.
  • default disables UUID authentication.
  • uuid enables UUID authentication.

Default value: default

repl_uuid

Parameter description: This parameter sets the UUID code to be used for primary and standby nodes authentication.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

img NOTICE:

  • If UUID authentication is enabled on the host and the repl_uuid authentication code is configured with a non-empty string, then the primary and standby nodes need to be enabled and configured with the same repl_uuid authentication code, otherwise primary and standby log replication and standby nodes rebuild requests will be rejected by the host.
  • This parameter supports SIGHUP to dynamically load new values. After the modification, it does not affect the primary and standby nodes that have already been established, and it takes effect for subsequent primary and standby nodes replication requests and primary and standby nodes rebuild requests.
  • Supports the verification of standby rebuild under the Quorum and DCF protocols; supports the verification of primary and standby nodes replication under the Quorum protocol; does not support the verification of primary and standby nodes replication under the DCF protocol.
  • The UUID verification function is mainly to prevent data crosstalk and pollution caused by misconnection between the master and the standby, and is not used for security purposes.
  • This parameter does not support automatic synchronization between master and backup.

Value range: String type. Length 0 - 63 characters, combination of letters and numbers, case insensitive, internally converted to lowercase uniformly stored. An empty string indicates that UUID authentication is not enabled.

Default value: Empty string

replconninfoN

Parameter description: Specifies the information about the N node to be listened to and authenticated by the current server (N ranges from 1 to 18).

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: a string. An empty string indicates that no information about the N node is configured.

Default value: empty

Note: localservice and remoteservice are the listening ports used for RPC services in versions 1.1 and 2.0, which are deprecated in subsequent versions and do not need to be configured.

cross_cluster_replconninfoN

Parameter description: Specifies the information about the N node to be listened on and authenticated by the current server across clusters (N ranges from 1 to 8).

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: a string. An empty string indicates that no information about the N node is configured.

Default value: empty

available_zone

Parameter description: Specifies the region where the local node is located.

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

Value range: a string. An empty string indicates that no information about the node is configured.

Default value: empty

enable_availablezone

Parameter description: Sets whether cascaded standby nodes on this end can connect to standbys across available_zone.

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

Value range: Boolean

  • on indicates that cascaded standby nodes can only connect to standbys in the same available_zone.

  • off indicates that the cascaded standby node can connect to standbys in different available_zones.

Default value: off

max_keep_log_seg

Parameter description: Flow control parameter, logical replication in the database node local will parse the physical logs into logical logs, when the number of physical log files not parsed is greater than this parameter will trigger the flow limit. If the number of physical log files that are not parsed is greater than this parameter, flow limiting will be triggered.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Integer, 0 ~ 2147483647.

Default value: 0

pgxc_node_name

Parameter description: Specifies the name of a node.

This parameter is a POSTMASTER parameter. Set it based on Table 1 GUC parameters.

When a standby node requests to replicate logs on the primary node, if the application_name parameter is not set, the pgxc_node_name parameter is used as the name of the streaming replication slot of the standby node on the primary node. The streaming replication slot is named in the following format: Value of this parameter_IP address of the standby node_Port number of the standby node. The IP address and port number of the standby node are obtained from the IP address and port number of the standby node specified by the replconninfo parameter. The maximum length of a streaming replication slot name is 61 characters. If the length of the concatenated string exceeds 61 characters, the truncated pgxc_node_name will be used for concatenation to ensure that the length of the streaming replication slot name is less than or equal to 61 characters.

img Note: After this parameter is modified, the database instance will fail to be connected. You are advised not to modify this parameter.

Value range: a string

Default value: current node name

enable_ddl_logical_record

Parameter description: Controls whether or not to enable DDL support for database logic decoding. This parameter will control whether DDL-related wal logs are written in the new write wal log function. (Introduced in MogDB 5.0.8)

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Boolean

  • on: when there is a DDL command, successful execution of the DDL command writes a wal log of type xl_logical_ddl_message to the wal log for logical decoding.

  • off: logical decoding does not support DDL operations. When set to off, the output of plugins such as wal2json will be empty change no matter how it is configured.

Default value: off

Copyright © 2011-2024 www.enmotech.com All rights reserved.