PostgreSQL 18 · Performance and maintenance

See running queries

List sessions and what they are executing.

SELECT pid, state, query FROM pg_stat_activity;

Official PostgreSQL 18 documentation

More performance and maintenance commands

All performance and maintenance commands · PostgreSQL 18 cheatsheet

Was this page helpful?