I have a problem where postgresql 9.3 got stuck, and the number of postgresql processes increased from about 15 to 225 in 10 minutes.
I ran the query:
select pid, query_start, waiting, state, query from pg_stat_activity order by query_start;
But it showed mostly select statements -- all of them the same one, with a couple of joins. They are not in a waiting state but have been running for over 2 hours.