Skip to content

Instantly share code, notes, and snippets.

@mcorsen
Created June 6, 2014 16:25
Show Gist options
  • Save mcorsen/0947b83f9ff7ae63fdeb to your computer and use it in GitHub Desktop.
Save mcorsen/0947b83f9ff7ae63fdeb to your computer and use it in GitHub Desktop.
Postgresql 9.1 query to list current queries
SELECT usename, client_addr, waiting, backend_start, query_start, procpid, current_query
FROM pg_stat_activity
ORDER BY usename, client_addr, backend_start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment