Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Usage specification recommendations
TDSTORE_PESSIMISTIC_DEADLOCK_DETAIL_INFO system table, you can obtain the detailed waiting relationships of transactions forming deadlock rings in all historical deadlocks: including the transaction IDs applying for locks and blocking, the lock ranges being applied for and blocked, the node on which the SQL causing this waiting relationship is running, and the SQL statement being executed by the transaction causing this waiting relationship.Field Name | Type | Description |
rollback_trans_id | bigint unsigned | The ID of the transaction rolled back in this deadlock ring. |
requesting_node | varchar(64) | The SQLEngine node name executing the transaction requesting the pessimistic lock in the wait relationship of the lock. |
requesting_trans_id | bigint unsigned | The transaction ID requesting the pessimistic lock in the wait relationship of the lock. |
blocking_trans_id | bigint unsigned | The transaction ID that already holds the pessimistic lock in the wait relationship of the lock. |
req_lock_range | varchar(64) | The lock range requested by the transaction applying for the pessimistic lock in the wait relationship of the lock. |
blk_lock_range | varchar(64) | The lock range currently held by the transaction that already holds the pessimistic lock in the wait relationship of the lock. |
timestamp | varchar(64) | The occurrence time of the deadlock event corresponding to this deadlock ring. |
requesting_sql | varchar(128) | The SQL statement currently being executed by the transaction requesting the pessimistic lock in the wait relationship of the lock. |
tdsql> SELECT * FROM information_schema.tdstore_pessimistic_deadlock_detail_info \\G*************************** 1. row ***************************rollback_trans_id: 29468596191101374requesting_node: node-1requesting_trans_id: 29468595838780035blocking_trans_id: 29468595939442912req_lock_range: 000027308000000Fblk_lock_range: 000027308000000Ftimestamp: 2025-08-29 19:00:30 82requesting_sql: SELECT * FROM deadlock_test WHERE id = 15 FOR UPDATE*************************** 2. row ***************************rollback_trans_id: 29468596191101374requesting_node: node-2requesting_trans_id: 29468595939442912blocking_trans_id: 29468596191101374req_lock_range: [0000273080000010,0000273080000015)blk_lock_range: [0000273080000010,0000273080000015)timestamp: 2025-08-29 19:00:30 82requesting_sql: SELECT * FROM deadlock_test WHERE id BETWEEN 16 AND 20 FOR UPDATE*************************** 3. row ***************************rollback_trans_id: 29468596191101374requesting_node: node-3requesting_trans_id: 29468596191101374blocking_trans_id: 29468595838780035req_lock_range: 000027308000000Cblk_lock_range: [000027308000000A,000027308000000F)timestamp: 2025-08-29 19:00:30 82requesting_sql: SELECT * FROM deadlock_test WHERE id = 12 FOR UPDATE
-- Query detailed information on historical deadlocks on all nodesSELECT * FROM information_schema.tdstore_pessimistic_deadlock_detail_info \\G-- Query detailed information about the deadlock event where the transaction with ID 29468596191101374 was rolled back on all nodes:SELECT * FROM information_schema.tdstore_pessimistic_deadlock_detail_info WHERE rollback_trans_id = 29468596191101374 \\G
피드백