tencent cloud

TDSQL Boundless

Release Notes
Product Introduction
Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Usage specification recommendations
Kernel Features
Kernel Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Billing
Billing Overview
Purchase Method
Pricing Details
Renewal
Overdue Payments
Refund
Getting Started
Creating an Instance
Connect to Instances
User Guide
Data Migration
Data Subscription
Instance Management
Parameter Configuration
Account Management
Security Group
Backup and Restoration
Database Auditing
Tag Management
Use Cases
Technical Evolution and Usage Practices of Online DDL
Lock Mechanism Analysis and Troubleshooting Practices
Data Intelligent Scheduling and Related Practices for Performance Optimization
TDSQL Boundless Selection Guide and Practical Tutorial
Developer Guide
Developer Guide (MySQL Compatibility Mode)
Developer Guide (HBase Compatibility Mode)
Performance Tuning
Performance Tuning Overview
SQL Tuning
DDL Tuning
Performance White Paper
Performance Overview
TPC-C Test
Sysbench Test
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
General Reference
System Architecture
SQL Reference
Database Parameter Description
TPC-H benchmark data model reference
Error Code Information
Security and Compliance
FAQs
Agreements
Service Level Agreement
Terms of Service
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

TDSTORE_PESSIMISTIC_DEADLOCK_DETAIL_INFO

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-02-10 11:06:32

Function

On the node performing deadlock detection, by querying the 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 Description

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.

Examples

Output example:
tdsql> SELECT * FROM information_schema.tdstore_pessimistic_deadlock_detail_info \\G
*************************** 1. row ***************************
rollback_trans_id: 29468596191101374
requesting_node: node-1
requesting_trans_id: 29468595838780035
blocking_trans_id: 29468595939442912
req_lock_range: 000027308000000F
blk_lock_range: 000027308000000F
timestamp: 2025-08-29 19:00:30 82
requesting_sql: SELECT * FROM deadlock_test WHERE id = 15 FOR UPDATE
*************************** 2. row ***************************
rollback_trans_id: 29468596191101374
requesting_node: node-2
requesting_trans_id: 29468595939442912
blocking_trans_id: 29468596191101374
req_lock_range: [0000273080000010,0000273080000015)
blk_lock_range: [0000273080000010,0000273080000015)
timestamp: 2025-08-29 19:00:30 82
requesting_sql: SELECT * FROM deadlock_test WHERE id BETWEEN 16 AND 20 FOR UPDATE
*************************** 3. row ***************************
rollback_trans_id: 29468596191101374
requesting_node: node-3
requesting_trans_id: 29468596191101374
blocking_trans_id: 29468595838780035
req_lock_range: 000027308000000C
blk_lock_range: [000027308000000A,000027308000000F)
timestamp: 2025-08-29 19:00:30 82
requesting_sql: SELECT * FROM deadlock_test WHERE id = 12 FOR UPDATE
Query Example
-- Query detailed information on historical deadlocks on all nodes
SELECT * 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

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백