Redshift Observatory

System Table Tracker

System view pg_catalog.pg_stat_activity version 1.0.52931 / 2023-07-07

schema name column data type
pg_catalog pg_stat_activity current_query text
pg_catalog pg_stat_activity datid oid
pg_catalog pg_stat_activity datname name
pg_catalog pg_stat_activity procpid int4
pg_catalog pg_stat_activity query_start timestamptz
pg_catalog pg_stat_activity usename name
pg_catalog pg_stat_activity usesysid int4

View Text

SELECT d.oid AS datid,
       d.datname,
       pg_stat_get_backend_pid(s.backendid) AS procpid,
       pg_stat_get_backend_userid(s.backendid) AS usesysid,
       u.usename,
       pg_stat_get_backend_activity(s.backendid) AS current_query,
       pg_stat_get_backend_activity_start(s.backendid) AS query_start
FROM pg_database AS d,
     (SELECT pg_stat_get_backend_idset() AS backendid) AS s,
     pg_shadow AS u
WHERE pg_stat_get_backend_dbid(s.backendid) = d.oid
  AND pg_stat_get_backend_userid(s.backendid) = u.usesysid


Home 3D Друк Blog Bring-Up Times Consultancy Cross-Region Benchmarks Email Forums IRC Mailing Lists Reddit Redshift Price Tracker Redshift Version Tracker Redshift Workbench System Table Tracker The Known Universe Twitter White Papers