Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add way to see current running queries #35

Open
zenitraM opened this issue Jun 10, 2015 · 1 comment
Open

Add way to see current running queries #35

zenitraM opened this issue Jun 10, 2015 · 1 comment

Comments

@zenitraM
Copy link

Not sure if we want to make this public, but just discovered you can use the SQL API to see your own long running queries and terminate them.
As you presales guys are keen on running long queries 😛, it could be useful to have this.
It will only work to see the queries ran with the API key, though, not for the public_user used for read-only calls.

select * from pg_stat_activity where usename=current_user
and
select * pg_terminate_backend(pid)

You can only kill your own queries. Useful query to kill everything you have running:
select pg_terminate_backend(pid) from pg_stat_activity where usename=current_user

@danicarrion
Copy link
Contributor

I'm definitely adding this to the tool. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants