GLOBAL_SESSION_STAT_ACTIVITY
Displays information about threads that are running on each node in the cluster, as described in Table 1.
Name |
Type |
Description |
---|---|---|
coorname |
text |
CN name. |
datid |
oid |
OID of the database that the user session connects to in the backend. |
datname |
text |
Name of the database that the user session connects to in the backend. |
pid |
bigint |
Backend thread ID. |
usesysid |
oid |
OID of the user logged in to the backend. |
usename |
text |
Name of the user logged in to the backend. |
application_name |
text |
Name of the application connected to the backend. |
client_addr |
inet |
IP address of the client connected to the backend. If this column is NULL, it indicates either the client is connected via a Unix socket on the server or this is an internal thread, for example, autovacuum is displayed for the thread autovacuum. |
client_hostname |
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. |
client_port |
integer |
TCP port number that the client uses for communication with the backend (–1 if a Unix socket is used). |
backend_start |
timestamp with time zone |
Time when this process was started, that is, when the client connected to the server. |
xact_start |
timestamp with time zone |
Time when current transaction was started (null if no transaction is active). If the current query is the first of its transaction, the value of this column is the same as that of the query_start column. |
query_start |
timestamp with time zone |
Time when the currently active query was started, or time when the last query was started if state is not active. For a stored procedure or function, the first query time is queried and does not change with the running of statements in the stored procedure. |
state_change |
timestamp with time zone |
Time when state was last modified. |
waiting |
Boolean |
If the background is waiting for a lock, the value is true. Otherwise, the value is false. If a lock is being waited for on a DN, determine the DN based on the wait_status column in the pg_thread_wait_status view and query the waiting column in pg_stat_activity on the DN to check whether a lock wait occurs. |
state |
text |
Overall status of this backend. The value can be:
|
resource_pool |
name |
Resource pool used by the user. |
query_id |
bigint |
ID of a query. |
query |
text |
Latest query at the backend. If state is active, this column shows the ongoing query. In all other states, it shows the last query that was executed. |
unique_sql_id |
bigint |
Unique SQL statement ID. |
trace_id |
text |
Trace ID passed by the driver, which is used to identify a request of an application. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot