pg_stat_activity_global#

The pg_stat_activity_global system view provides information of the queries runing in the cluster.

Table 1. pg_catalog.pg_stat_activity_global

column

type

references

description

datid

oid

database oid

datname

name

database name

host

text

host of main node that run the query

procpid

integer

process ID

sess_id

integer

session ID

usesysid

oid

user OID

usename

name

user name

current_query

text

current query

waiting

boolean

query’s waiting status

query_start

timestamp with time zone

time at which the current query began execution

backend_start

timestamp with time zone

time at which he process was started

client_addr

inet

client’s address number

client_port

integer

client’s port number

application_name

text

the name of backend process connect to server

xact_start

timestamp with time zone

time at which the current transaction started. Null when the process is without transaction.

waiting_resource

boolean

status of waiting for resource manager.