openGauss Transactions

This section describes the settings and value ranges of openGauss transaction parameters.

transaction_isolation

Parameter description: specifies the isolation level of the current transaction.

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

Value range: a string of case-sensitive characters. The values include:

  • serializable: This value is equivalent to REPEATABLE READ in openGauss.
  • read committed indicates that only the data in committed transactions will be read.
  • repeatable read indicates that only the data committed before transaction start is read. Uncommitted data or data committed in other concurrent transactions cannot be read.
  • default: The value is the same as that of default_transaction_isolation.

Default value: read committed

transaction_read_only

Parameter description: Specifies whether the current transaction is a read-only transaction.

This parameter has a fixed value on during database restoration or on the standby node. Otherwise, set this parameter to the value of default_transaction_read_only.

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

Value range: Boolean

  • on indicates that the current transaction is a read-only transaction.
  • off indicates that the current transaction can be a read/write transaction.

Default value: off

xc_maintenance_mode

Parameter description: Specifies whether the system is in maintenance mode.

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

Value range: Boolean

  • on indicates that the system is in maintenance mode.
  • off indicates that the system is not in maintenance mode.

NOTICE:

Enable the maintenance mode with caution to avoid openGauss data inconsistencies.

Default value: off

allow_concurrent_tuple_update

Parameter description: Specifies whether to allow concurrent update.

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

Value range: Boolean

  • on indicates that the concurrent update is allowed.
  • off indicates that the system is not in maintenance mode.

Default value: on

transaction_deferrable

Parameter description: Specifies whether to delay the execution of a read-only serial transaction without incurring an execution failure. Assume this parameter is set to on. When the server detects that the tuples read by a read-only transaction are being modified by other transactions, it delays the execution of the read-only transaction until the other transactions finish modifying the tuples. This parameter is reserved and does not take effect in this version. Similar to this parameter, the default_transaction_deferrable parameter is used to specify whether to allow delayed execution of a transaction.

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

Value range: Boolean

  • on indicates that the execution of a read-only serial transaction can be delayed.
  • off indicates that the execution of a read-only serial transaction cannot be delayed.

Default value: off

enable_show_any_tuples

Parameter description: This parameter is available only in a read-only transaction and is used for analysis. When this parameter is set to on or true, all versions of tuples in the table are displayed.

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

Value range: Boolean

  • on or true indicates that all versions of tuples in the table are displayed.
  • off or false indicates that no versions of tuples in the table are displayed.

Default value: off

replication_type

Parameter description: Specifies whether the current HA mode is standalone, primary/standby/secondary, or one primary multiple standbys.

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

This parameter is an internal parameter. Do not set it.

Value range: 0 to 2

  • 2 Indicates the single primary mode. In this mode, the standby node cannot be expanded.
  • 1 Indicates that the one-primary-multiple-standby mode is used, covering all scenarios. This mode is recommended.
  • 0 Indicates the primary/standby mode. Currently, this mode is not supported.

Default value: 1

NOTE:

In the Lite scenario, openGauss does not support the one primary multiple standbys mode.

pgxc_node_name

Parameter description: Specifies the name of a node.

This parameter is a POSTMASTER parameter. Set it based on Table 2.

When a standby node requests to replicate logs on the primary node, if the application_name parameter is not set, this 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.

CAUTION:

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_defer_calculate_snapshot

Parameter description: Specifies the delay in calculating xmin and oldestxmin. Calculation is triggered only when 1000 transactions are executed or the interval is 1s. If this parameter is set to on, the overhead of calculating snapshots can be reduced in heavy-load scenarios, but the progress of oldestxmin is slow, affecting tuple recycling. If this parameter is set to off, xmin and oldestxmin can be calculated in real time, but the overhead for calculating snapshots increases.

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

Value range: Boolean

  • on indicates that snapshots xmin and oldestxmin are calculated with a delay.
  • off indicates that snapshot xmin and oldestxmin are calculated in real time.

Default value: on

Feedback
编组 3备份
    openGauss 2024-07-20 01:00:34
    cancel