Daily Shaarli

All links of one day in a single page.

July 13, 2018

How to see active connections and "current activity" in PostgreSQL 8.4 - Server Fault
thumbnail

select *
from pg_stat_activity
where datname = 'mydatabasename'

See also pg-top, which acts like top except it shows postgres activity.

Install pg-top (in Debian, the package is called "ptop").
Become the postgres user (e.g. sudo su postgres)
Run pg_top