DV_SESSIONS
DV_SESSIONS displays information about all active backend threads. By default, only the system administrator can access this view. Common users can access the view only after being authorized.
Name |
Type |
Description |
---|---|---|
sid |
bigint |
OID of the active backend thread of the current session. |
serial# |
integer |
Sequence number of the active backend thread, which is 0 in GaussDB |
user# |
oid |
OID of the user logged in to the backend thread. The OID is 0 if the backend thread is a global auxiliary thread. |
username |
name |
Name of the user logged in to the backend thread. username is null if the backend thread is a global auxiliary thread. application_name can be identified by associating with pg_stat_get_activity(). Example: SELECT s.*,a.application_name FROM DV_SESSIONS AS s LEFT JOIN pg_stat_get_activity(NULL) AS a ON s.sid=a.sessionid; |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.