Not answering the exact question, but this might be useful to someone with this question.
I wanted to monitor connection activity in pgadmin. Particularly because my web app kept maxing out the number of open connections by not closing them. So I added this query in pgadmin's query tool:
SELECT
application_name,
backend_start,
query_start,
state,
query
FROM pg_stat_activity
WHERE datname = 'blablabla';
And then ran this in my browser's development console to repeat the query every second. This is an ugly, but practical way to go about it if you just need to debug something once.
const interval = setInterval(() => document.querySelector('[data-label="Execute script"]').click(), 1000)
To clear this behavior, either reload the page or run this.
clearInterval(interval)
This looks like this:
