更新时间:2025-07-08 GMT+08:00
分享

状态信息函数

fabricsql_query_wait_status(session_id)

描述:用于查看指定会话的执行单元线程之间的等待状态。

返回值类型:record

函数返回信息如下:

表1 fabricsql_query_wait_status(session_id)字段

名称

类型

描述

actor_name

text

actor的名称。

actor_id

text

acotr的id。

actor_ip

text

actor的ip。

db_name

text

数据库名称。

thread_name

text

线程名称。

query_id

bigint

查询id。

tid

bigint

当前线程的线程号。

lwtid

integer

当前线程的轻量级线程号。

ptid

integer

streaming线程的父线程。

headop

integer

streaming线程的层级。

smpid

integer

并行线程的id。

wait_status

text

当前线程的等待状态。

wait_event

text

如果wait_status是acquire lock、acquire lwlock、wait io三种类型,此列描述具体的锁、轻量级锁、IO的信息。否则为空。

示例:

1
2
3
4
5
6
7
SELECT * FROM fabricsql_query_wait_status(139775106588720);
  actor_name  |                   actor_id                   |  actor_ip   | db_name | thread_name |     query_id      |       tid       |  lwtid  | ptid | headop | smpid | wait_status | wait_event

--------------+----------------------------------------------+-------------+---------+-------------+-------------------+-----------------+---------+------+--------+-------+-------------+-----------
-
 coordinator1 | runtime-c7010000-0000-4000-8bad-1509e41e3b67 | 10.42.0.240 |         | gsql        | 72339069014638600 | 140406720987184 | 4194244 |      |      0 |     0 | none        |
(1 row)

相关文档