Updated on 2025-07-22 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 hotspot key is located.

serial#

integer

Name of the schema where the hotspot key is located.

schemaname

name

Name of the table where the hotspot key is located.

user#

oid

Value of the hotspot key.

username

name

Hash value of the hotspot key in the database. If the table is a list or range distributed table, the value of this column is 0.

machine

text

Frequency of accessing the hotspot key.

sql_id

bigint

SQL OID.

client_info

text

Client information.

event

text

Queuing status of a statement. The value can be:

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

sql_exec_start

timestamp

Start time of SQL statement execution.

program

text

Name of the application connected to the backend.

status

text

Overall status of this backend. The 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.