Quick onboard
Deployment
Data Modeling
Connecting
Migration
Query
Operations and Maintenance
Common Maintenance
Partition
Backup and Restore
Expansion
Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool guide
Data type
Storage Engine
Executor
Stream
DR (Disaster Recovery)
Configuration
Index
Extension
SQL Reference
This document describes the parameters in the Lock Management category of system configuration.
YMatrix implements the following two deadlock detection mechanisms:
Deadlock Detection Mechanism:
Global Deadlock Detection Mechanism:
Note!
To ensure system stability and security, manually modifying these parameters should be done with extreme caution.
The amount of time (in milliseconds) to wait on a lock before checking for deadlock.
1000, which may be the smallest practical value. On heavily loaded servers, you may need to increase it. The optimal setting should exceed the typical transaction duration to reduce the chance of initiating deadlock checks before locks are released.log_lock_waits is enabled, this parameter also determines the waiting time before logging lock-wait events. To investigate lock delays, you may want to set a value smaller than the default deadlock_timeout.| Data Type | Default Value | Range | Setting Scope |
|---|---|---|---|
| int | 1000 | 1 ~ INT_MAX | segment; system; restart; superuser |
Enables or disables the YMatrix global deadlock detector for managing concurrent UPDATE and DELETE operations on HEAP tables to improve performance.
off; the global deadlock detector is disabled.INSERT.CREATE, ALTER, and DROP may also trigger deadlocks.| Data Type | Default Value | Setting Scope |
|---|---|---|
| boolean | off | master; system; restart |
Specifies the detection interval (in seconds) for the Global Deadlock Detector (GDD) background worker process.
| Data Type | Default Value | Range | Setting Scope |
|---|---|---|---|
| int | 120 | 5 ~ INT_MAX | master; system; reload |
The shared lock table tracks locks on up to max_locks_per_transaction * (max_connections + max_prepared_transactions) distinct objects.
| Data Type | Default Value | Range | Setting Scope |
|---|---|---|---|
| int | 128 | 10 ~ INT_MAX | segments; system; restart |
Controls the number of rows a predicate lock can cover on a single page before it is escalated to cover the entire page.
| Data Type | Default Value | Range | Setting Scope |
|---|---|---|---|
| int | 2 | 0 ~ INT_MAX | segments; system; reload |
Controls the number of pages or tuples a predicate lock can cover in a single relation before it is escalated to cover the entire relation.
0 represents an absolute limit. A negative value means the limit is calculated as max_pred_locks_per_transaction divided by the absolute value of this setting.| Data Type | Default Value | Range | Setting Scope |
|---|---|---|---|
| int | -2 | INT_MIN ~ INT_MAX | segments; system; reload |
The shared predicate lock table tracks locks on up to max_pred_locks_per_transaction * (max_connections + max_prepared_transactions) distinct objects (e.g., tables).
| Data Type | Default Value | Range | Setting Scope |
|---|---|---|---|
| int | 64 | 10 ~ INT_MAX | segments; system; restart |