How to get a list of active queries in a Joe session and stop long-running queries
- Run a long query, for example, it could be index creation or select from a big table. For demo purposes, we will use
explain select pg_select(20).
- Web UI
- Slack


- Run the
activitycommand to get a list of currently running sessions in Postgres.
- Web UI
- Slack


- If you want to stop the execution of a long-running query, run the
terminatecommand with query'sPIDfrom theactivitylist.
- Web UI
- Slack


- Check that query was stopped. You can run the
activitycommand again or scroll to the query execution message, it should haveterminating connection due to administrator commandstatus now.
- Web UI
- Slack

