Updated on 2024-06-03 GMT+08:00

V_SESSION

V_SESSION describes information about all current sessions. Only administrators can access this view. Common users can access this view only after being authorized. This view exists in both PG_CATALOG and SYS schemas.

Table 1 V_SESSION columns

Name

Type

Description

saddr

raw

Not supported. Set it to NULL.

sid

bigint

Session ID

serial#

integer

Sequence number of the active background thread, which is 0 in GaussDB

audsid

numeric

Not supported. Set it to NULL.

paddr

raw

Not supported. Set it to NULL.

schema#

numeric

Not supported. Set it to NULL.

schemaname

name

Name of the user logged in to the backend

user#

oid

OID of the user that has logged in to the background thread (0 if the background thread is a global auxiliary thread)

username

name

Username of the user that has logged in to the background thread. (null if the background thread is a global auxiliary thread)

command

numeric

Not supported. Set it to NULL.

ownerid

numeric

Not supported. Set it to NULL.

taddr

character varying(16)

Not supported. Set it to NULL.

lockwait

character varying(16)

Not supported. Set it to NULL.

machine

text

Host name of the connected client, as reported by a reverse DNS lookup of client_addr. This column will be non-null only for IP connections and only when log_hostname is enabled.

sql_id

bigint

ID of a query

client_info

text

Client information

event

text

Queuing status of a statement. Its value can be:
  • waiting in queue: The statement is in the queue.
  • Empty: The statement is running.

sql_exec_start

timestamp with time zone

Time when the currently active query was started, or time when the last query was started if the value of state is not active

program

text

Name of the application connected to the backend

status

text

Overall status of this backend. Its value can be:
  • active: The backend is executing a query.
  • idle: The backend is waiting for a new client command.
  • idle in transaction: The backend is in a transaction, but there is no statement being executed in the transaction.
  • idle in transaction (aborted): The backend is in a transaction, but there are statements failed in the transaction.
  • fastpath function call: The backend is executing a fast-path function.
  • disabled: This state is reported if track_activities is disabled in this backend.

server

character varying(9)

Not supported. Set it to NULL.

pdml_status

character varying(8)

Specifies whether to enable a DML parallel execution in the current session.

port

numeric

Port number of the current session

process

character varying(24)

Process ID of the current session

logon_time

date

Login time of the current session

last_call_et

integer

Duration when the status of the current session changes last time

osuser

character varying(128)

Not supported. Set it to NULL.

terminal

character varying(30)

Not supported. Set it to NULL.

type

character varying(10)

Not supported. Set it to NULL.

sql_address

raw

Not supported. Set it to NULL.

sql_hash_value

numeric

Not supported. Set it to NULL.

sql_child_number

numeric

Not supported. Set it to NULL.

sql_exec_id

numeric

Not supported. Set it to NULL.

prev_sql_addr

raw

Not supported. Set it to NULL.

prev_hash_value

numeric

Not supported. Set it to NULL.

prev_sql_id

character varying(13)

Not supported. Set it to NULL.

prev_child_number

numeric

Not supported. Set it to NULL.

prev_exec_start

date

Not supported. Set it to NULL.

prev_exec_id

numeric

Not supported. Set it to NULL.

plsql_entry_object_id

numeric

Not supported. Set it to NULL.

plsql_entry_subprogram_id

numeric

Not supported. Set it to NULL.

plsql_object_id

numeric

Not supported. Set it to NULL.

plsql_subprogram_id

numeric

Not supported. Set it to NULL.

module

character varying(64)

Not supported. Set it to NULL.

module_hash

numeric

Not supported. Set it to NULL.

action

character varying(64)

Not supported. Set it to NULL.

action_hash

numeric

Not supported. Set it to NULL.

fixed_table_sequence

numeric

Not supported. Set it to NULL.

row_wait_obj#

numeric

Not supported. Set it to NULL.

row_wait_file#

numeric

Not supported. Set it to NULL.

row_wait_block#

numeric

Not supported. Set it to NULL.

row_wait_row#

numeric

Not supported. Set it to NULL.

top_level_call#

numeric

Not supported. Set it to NULL.

pdml_enabled

character varying(3)

Not supported. Set it to NULL.

failover_type

character varying(13)

Not supported. Set it to NULL.

failover_method

character varying(10)

Not supported. Set it to NULL.

failed_over

character varying(3)

Not supported. Set it to NULL.

resource_consumer_group

character varying(32)

Not supported. Set it to NULL.

pddl_status

character varying(8)

Not supported. Set it to NULL.

pq_status

character varying(8)

Not supported. Set it to NULL.

current_queue_duration

numeric

Not supported. Set it to NULL.

client_identifier

character varying(64)

Not supported. Set it to NULL.

blocking_session_status

character varying(11)

Not supported. Set it to NULL.

blocking_instance

numeric

Not supported. Set it to NULL.

blocking_session

numeric

Not supported. Set it to NULL.

final_blocking_session_status

character varying(11)

Not supported. Set it to NULL.

final_blocking_instance

numeric

Not supported. Set it to NULL.

final_blocking_session

numeric

Not supported. Set it to NULL.

seq#

numeric

Not supported. Set it to NULL.

event#

numeric

Not supported. Set it to NULL.

p1text

character varying(64)

Not supported. Set it to NULL.

p1

numeric

Not supported. Set it to NULL.

p1raw

raw

Not supported. Set it to NULL.

p2text

character varying(64)

Not supported. Set it to NULL.

p2

numeric

Not supported. Set it to NULL.

p2raw

raw

Not supported. Set it to NULL.

p3text

character varying(64)

Not supported. Set it to NULL.

p3

numeric

Not supported. Set it to NULL.

p3raw

raw

Not supported. Set it to NULL.

wait_class_id

numeric

Not supported. Set it to NULL.

wait_class#

numeric

Not supported. Set it to NULL.

wait_class

character varying(64)

Not supported. Set it to NULL.

wait_time

numeric

Not supported. Set it to NULL.

seconds_in_wait

numeric

Not supported. Set it to NULL.

state

character varying(19)

Not supported. Set it to NULL.

wait_time_micro

numeric

Not supported. Set it to NULL.

time_remaining_micro

numeric

Not supported. Set it to NULL.

time_since_last_wait_micro

numeric

Not supported. Set it to NULL.

service_name

character varying(64)

Not supported. Set it to NULL.

sql_trace

character varying(8)

Not supported. Set it to NULL.

sql_trace_waits

character varying(5)

Not supported. Set it to NULL.

sql_trace_binds

character varying(5)

Not supported. Set it to NULL.

sql_trace_plan_stats

character varying(10)

Not supported. Set it to NULL.

session_edition_id

numeric

Not supported. Set it to NULL.

creator_addr

raw

Not supported. Set it to NULL.

creator_serial#

numeric

Not supported. Set it to NULL.

ecid

character varying(64)

Not supported. Set it to NULL.

sql_translation_profile_id

numeric

Not supported. Set it to NULL.

pga_tunable_mem

numeric

Not supported. Set it to NULL.

shard_ddl_status

character varying(8)

Not supported. Set it to NULL.

con_id

numeric

Not supported. Set it to NULL.

external_name

character varying(1024)

Not supported. Set it to NULL.

plsql_debugger_connected

character varying(5)

Not supported. Set it to NULL.