Whenever I inspect a system, there is a system view I like to inspect first before digging deeper. I am, of course, talking about pg_stat_activity. The idea behind the view is to give you a chance to figure out what is going on right now.
Here is how it works:
test=# \d pg_stat_activity View "pg_catalog.pg_stat_activity" Column | Type | Modifiers ------------------+--------------------------+----------- datid | oid | datname | name | pid | integer | usesysid | oid | usename | name | application_name | text | client_addr | inet | client_hostname | text | client_port | integer | backend_start | timestamp with time zone | xact_start | timestamp with time zone | query_start | timestamp with time zone | state_change ...