Skip to content

Instantly share code, notes, and snippets.

@greenpeas
Created October 25, 2018 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenpeas/e4a36241961369957bbdede058235574 to your computer and use it in GitHub Desktop.
Save greenpeas/e4a36241961369957bbdede058235574 to your computer and use it in GitHub Desktop.
postgresql process list
SELECT a.usename, a.pid, a.application_name, a.backend_start, (NOW()::timestamp - a.backend_start::timestamp) as dif, a.state, a.query
from pg_stat_activity a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment