pg_stat_activity

Monitoring

A PostgreSQL system view showing one row per server process with current activity: query text, state, wait events, transaction start time, and client information. Primary tool for monitoring active connections.