THREAD_WAIT_STATUS
THREAD_WAIT_STATUS allows you to test the block waiting status of the backend thread and auxiliary thread in the current instance. For details about events, see Table 2, Table 3, Table 4, and Table 5.
Table 1 THREAD_WAIT_STATUS columns
Query ID. The value of this column is the same as that of debug_query_id. | ||
Waiting status of the current thread. For details about the waiting status, see Table 2. | ||
If wait_status is acquire lock, acquire lwlock, or wait io, this column describes the lock, lightweight lock, and I/O information, respectively. If wait_status is not any of the three values, this column is empty. | ||
Information about the lock that the current thread is waiting for | ||
Lock mode that the current thread is waiting to obtain The values include modes in the table-level lock, row-level lock, and page-level lock. | ||
ID of the session that blocks the current thread from obtaining the lock | ||