Updated on 2023-10-23 GMT+08:00

GV_SESSION

GV_SESSION displays all session information about the current session.

Table 1 GV_SESSION columns

Name

Type

Description

sid

bigint

Name of the database where the hot key is located.

serial#

integer

Name of the schema where the hot key is located.

schemaname

name

Name of the table where the hot key is located.

user#

oid

Value of a hot key.

username

name

Hash value of the hot key in the database. If the table is a list or range distribution table, the value of this field is 0.

machine

text

Frequency of accessing the hot key.

sql_id

bigint

SQL OID.

client_info

text

Client information.

event

text

Queuing status of a statement. The value must be one of the following:

  • waiting in queue: The statement is in the queue.
  • Empty: The statement is running.

sql_exec_start

timestamp

SQL statement execution start time.

program

text

Name of the application connected to the backend.

status

text

Overall status of this backend. The value must be one of the following:

  • 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.