Usefull PostgreSQL commands
Source : https://gist.github.com/rgreenjr/3637525 — show running queries (pre 9.2) SELECT procpid, age(clock_timestamp(), query_start), usename, current_query FROM pg_stat_activity WHERE current_query != '<IDLE>' AND current_query NOT ILIKE