数据仓库服务 GAUSSDB(DWS)-PG_LWLOCKS:示例

时间:2024-12-09 15:13:24

示例

使用PG_LWLOCKS视图查询当前实例正在持有的或等待的轻量级锁信息:
1
2
3
4
5
6
SELECT * FROM pg_lwlocks;
       pid       |     query_id      | lwtid | reqlockid | reqlock | heldlocknums | heldlockid |      heldlock      | heldlockmode
-----------------+-------------------+-------+-----------+---------+--------------+------------+--------------------+--------------
 139810224192480 |                 0 | 54842 |           |         |            1 |          7 | WALWriteLock       | Exclusive
 139810224199520 | 78250043526306022 | 54963 |           |         |            1 |     193860 | BUFFER_POOL_LWLOCK | Exclusive
(2 rows)
support.huaweicloud.com/devg-910-dws/dws_04_1411.html