Skip to content

Instantly share code, notes, and snippets.

@mowings
Created September 18, 2020 18:06
Show Gist options
  • Save mowings/b4f5ab1ea44d5341532e5276226902c6 to your computer and use it in GitHub Desktop.
Save mowings/b4f5ab1ea44d5341532e5276226902c6 to your computer and use it in GitHub Desktop.
Postgres 9 active queries
select pid, datname, client_addr, age(clock_timestamp(), query_start), query from pg_stat_activity where state = 'active';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment