From 87a1ea29c496ea33f18597f6fae0eb8f91d914c3 Mon Sep 17 00:00:00 2001 From: gentle_hu Date: Sat, 22 Feb 2025 15:03:43 +0800 Subject: [PATCH] gs_lwlock_status --- ...41\346\201\257\345\207\275\346\225\260.md" | 95 ++++++++++++++++++ ...41\346\201\257\345\207\275\346\225\260.md" | 99 ++++++++++++++++++- 2 files changed, 193 insertions(+), 1 deletion(-) diff --git "a/content/docs-lite/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" "b/content/docs-lite/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" index 7b068ed73..fb8bd22ba 100644 --- "a/content/docs-lite/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" +++ "b/content/docs-lite/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" @@ -3511,4 +3511,99 @@ >![](public_sys-resources/icon-note.gif) **说明:** > >该视图不支持release版本轻量版场景。 + + + +- gs_lwlock_status() + + 描述:查看当前系统内轻量级锁的持锁、等锁情况。 + 返回值类型:setofrecord + + 示例: + ```sql + openGauss=# select * from gs_lwlock_status(); + node_name | lock_name | lock_unique_id | pid | sessionid | global_sessionid | mode | granted | start_time + -----------+-----------+----------------+-----+-----------+------------------+------+---------+------------ + (0 rows) + ``` + + 返回字段说明如下: + + **表 1** 返回字段说明 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

字段名称

+

字段类型

+

字段说明

+

node_name

+

text

+

节点名称

+

lock_name

+

text

+

轻量级锁的名字。

+

lock_unique_id

+

bigint

+

轻量级锁的唯一ID。

+

pid

+

bigint

+

持锁或等锁人的线程ID。

+

sessionid

+

bigint

+

持锁或等锁人的会话ID。

+

global_sessionid

+

text

+

资源池化全局会话ID。

+

mode

+

text

+

持锁或等锁的模式。

+

granted

+

boolean

+

是否持锁。true为持锁,false为等锁。

+

start_time

+

timestamp with time zone

+

持锁或等锁的开始时间。

+
+ \ No newline at end of file diff --git "a/content/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" "b/content/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" index be250fac9..b72a8bf7e 100644 --- "a/content/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" +++ "b/content/zh/docs/SQLReference/\347\273\237\350\256\241\344\277\241\346\201\257\345\207\275\346\225\260.md" @@ -3646,4 +3646,101 @@ 6 | 163840 | 6 | 3136 | 16 | 147456 (1 row) - ``` \ No newline at end of file + ``` + + + + +- gs_lwlock_status() + + 描述:查看当前系统内轻量级锁的持锁、等锁情况。 + + 返回值类型:setofrecord + + 示例: + ```sql + openGauss=# select * from gs_lwlock_status(); + node_name | lock_name | lock_unique_id | pid | sessionid | global_sessionid | mode | granted | start_time + -----------+-----------+----------------+-----+-----------+------------------+------+---------+------------ + (0 rows) + ``` + + 返回字段说明如下: + + **表 1** 返回字段说明 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

字段名称

+

字段类型

+

字段说明

+

node_name

+

text

+

节点名称

+

lock_name

+

text

+

轻量级锁的名字。

+

lock_unique_id

+

bigint

+

轻量级锁的唯一ID。

+

pid

+

bigint

+

持锁或等锁人的线程ID。

+

sessionid

+

bigint

+

持锁或等锁人的会话ID。

+

global_sessionid

+

text

+

资源池化全局会话ID。

+

mode

+

text

+

持锁或等锁的模式。

+

granted

+

boolean

+

是否持锁。true为持锁,false为等锁。

+

start_time

+

timestamp with time zone

+

持锁或等锁的开始时间。

+
+ \ No newline at end of file -- Gitee