云数据库 GaussDB-V_SESSION

时间:2023-11-01 16:22:19

V_SESSION

V_SESSION视图描述当前所有的会话信息,该视图只有管理员可以访问,普通用户需要授权才能访问,该视图同时存在于pg_catalog和sys两种schema下。

表1 V_SESSION字段

名称

类型

描述

saddr

raw

暂不支持,置NULL。

sid

bigint

会话ID。

serial#

integer

当前活动的后台线程的序号,在GaussDB中为0。

audsid

numeric

暂不支持,置NULL。

paddr

raw

暂不支持,置NULL。

schema#

numeric

暂不支持,置NULL。

schemaname

name

登录该后台的用户名。

user#

oid

登录此后台线程的用户的OID。oid 为0表示此后台线程为全局辅助线程(auxiliary)。

username

name

登录此后台线程的用户名。username为空表示此后台线程为全局辅助线程(auxiliary)。

command

numeric

暂不支持,置NULL。

ownerid

numeric

暂不支持,置NULL。

taddr

character varying(16)

暂不支持,置NULL。

lockwait

character varying(16)

暂不支持,置NULL。

machine

text

客户端的主机名,这个字段是通过client_addr的反向DNS查找得到。这个字段只有在启动log_hostname且使用IP连接时才非空。

sql_id

bigint

查询语句的ID。

client_info

text

客户端信息。

event

text

语句当前排队状态。可能值是:
  • waiting in queue:表示语句在排队中。
  • 空:表示语句正在运行。

sql_exec_start

timestamp with time zone

开始当前活跃查询的时间,如果state的值不是active,则这个值是上一个查询的开始时间。

program

text

连接到该后台的应用名。

status

text

该后台当前总体状态。可能值是:
  • active:后台正在执行一个查询。
  • idle:后台正在等待一个新的客户端命令。
  • idle in transaction:后台在事务中,但事务中没有语句在执行。
  • idle in transaction (aborted):后台在事务中,但事务中有语句执行失败。
  • fastpath function call:后台正在执行一个fast-path函数。
  • disabled:如果后台禁用track_activities,则报告这个状态。

server

character varying(9)

暂不支持,置NULL。

pdml_status

character varying(8)

当前会话是否启用DML的并行执行。

port

numeric

当前会话的端口号。

process

character varying(24)

当前会话的进程号。

logon_time

date

当前会话的登入时间。

last_call_et

integer

当前会话上次状态发生改变的时长。

osuser

character varying(128)

暂不支持,置NULL。

terminal

character varying(30)

暂不支持,置NULL。

type

character varying(10)

暂不支持,置NULL。

sql_address

raw

暂不支持,置NULL。

sql_hash_value

numeric

暂不支持,置NULL。

sql_child_number

numeric

暂不支持,置NULL。

sql_exec_id

numeric

暂不支持,置NULL。

prev_sql_addr

raw

暂不支持,置NULL。

prev_hash_value

numeric

暂不支持,置NULL。

prev_sql_id

character varying(13)

暂不支持,置NULL。

prev_child_number

numeric

暂不支持,置NULL。

prev_exec_start

date

暂不支持,置NULL。

prev_exec_id

numeric

暂不支持,置NULL。

plsql_entry_object_id

numeric

暂不支持,置NULL。

plsql_entry_subprogram_id

numeric

暂不支持,置NULL。

plsql_object_id

numeric

暂不支持,置NULL。

plsql_subprogram_id

numeric

暂不支持,置NULL。

module

character varying(64)

暂不支持,置NULL。

module_hash

numeric

暂不支持,置NULL。

action

character varying(64)

暂不支持,置NULL。

action_hash

numeric

暂不支持,置NULL。

fixed_table_sequence

numeric

暂不支持,置NULL。

row_wait_obj#

numeric

暂不支持,置NULL。

row_wait_file#

numeric

暂不支持,置NULL。

row_wait_block#

numeric

暂不支持,置NULL。

row_wait_row#

numeric

暂不支持,置NULL。

top_level_call#

numeric

暂不支持,置NULL。

pdml_enabled

character varying(3)

暂不支持,置NULL。

failover_type

character varying(13)

暂不支持,置NULL。

failover_method

character varying(10)

暂不支持,置NULL。

failed_over

character varying(3)

暂不支持,置NULL。

resource_consumer_group

character varying(32)

暂不支持,置NULL。

pddl_status

character varying(8)

暂不支持,置NULL。

pq_status

character varying(8)

暂不支持,置NULL。

current_queue_duration

numeric

暂不支持,置NULL。

client_identifier

character varying(64)

暂不支持,置NULL。

blocking_session_status

character varying(11)

暂不支持,置NULL。

blocking_instance

numeric

暂不支持,置NULL。

blocking_session

numeric

暂不支持,置NULL。

final_blocking_session_status

character varying(11)

暂不支持,置NULL。

final_blocking_instance

numeric

暂不支持,置NULL。

final_blocking_session

numeric

暂不支持,置NULL。

seq#

numeric

暂不支持,置NULL。

event#

numeric

暂不支持,置NULL。

p1text

character varying(64)

暂不支持,置NULL。

p1

numeric

暂不支持,置NULL。

p1raw

raw

暂不支持,置NULL。

p2text

character varying(64)

暂不支持,置NULL。

p2

numeric

暂不支持,置NULL。

p2raw

raw

暂不支持,置NULL。

p3text

character varying(64)

暂不支持,置NULL。

p3

numeric

暂不支持,置NULL。

p3raw

raw

暂不支持,置NULL。

wait_class_id

numeric

暂不支持,置NULL。

wait_class#

numeric

暂不支持,置NULL。

wait_class

character varying(64)

暂不支持,置NULL。

wait_time

numeric

暂不支持,置NULL。

seconds_in_wait

numeric

暂不支持,置NULL。

state

character varying(19)

暂不支持,置NULL。

wait_time_micro

numeric

暂不支持,置NULL。

time_remaining_micro

numeric

暂不支持,置NULL。

time_since_last_wait_micro

numeric

暂不支持,置NULL。

service_name

character varying(64)

暂不支持,置NULL。

sql_trace

character varying(8)

暂不支持,置NULL。

sql_trace_waits

character varying(5)

暂不支持,置NULL。

sql_trace_binds

character varying(5)

暂不支持,置NULL。

sql_trace_plan_stats

character varying(10)

暂不支持,置NULL。

session_edition_id

numeric

暂不支持,置NULL。

creator_addr

raw

暂不支持,置NULL。

creator_serial#

numeric

暂不支持,置NULL。

ecid

character varying(64)

暂不支持,置NULL。

sql_translation_profile_id

numeric

暂不支持,置NULL。

pga_tunable_mem

numeric

暂不支持,置NULL。

shard_ddl_status

character varying(8)

暂不支持,置NULL。

con_id

numeric

暂不支持,置NULL。

external_name

character varying(1024)

暂不支持,置NULL。

plsql_debugger_connected

character varying(5)

暂不支持,置NULL。

support.huaweicloud.com/distributed-devg-v3-opengauss/gaussdb-12-1203.html