Discussion:
Killing Long running query or user session
(too old to reply)
David Ecker
2004-08-10 09:14:13 UTC
Permalink
How can I kill/stop a long running query or a complete user session using an
superuser account?

Thx
David Ecker
Gaetano Mendola
2004-08-10 11:03:28 UTC
Permalink
Post by David Ecker
How can I kill/stop a long running query or a complete user session using an
superuser account?
Thx
David Ecker
At my knowledge you have to kill SIGTERM the backedn that is managing the
connection. Do as super user "select * from pg_stat_activity", look at
the procpid that have to be killed and kill it.



Regards
Gaetano Mendola
David Ecker
2004-08-10 12:47:38 UTC
Permalink
Is there a posibilty to kick the session through a sql-statement? I don't
want to give shell access to the postgreSQL administrator.

Another posibility would be to block access to a database for a set of
users/groups using sql only. Is there such a command?

thx
David Ecker
Post by Gaetano Mendola
Post by David Ecker
How can I kill/stop a long running query or a complete user session using
an superuser account?
Thx
David Ecker
At my knowledge you have to kill SIGTERM the backedn that is managing the
connection. Do as super user "select * from pg_stat_activity", look at
the procpid that have to be killed and kill it.
Regards
Gaetano Mendola
Gaetano Mendola
2004-08-10 14:27:54 UTC
Permalink
Post by David Ecker
Is there a posibilty to kick the session through a sql-statement?
NOPE
Post by David Ecker
Another posibility would be to block access to a database for a set of
users/groups using sql only. Is there such a command?
You can allow the acces to certain DB to a user and from some IP,
I don't know if this can help you and/or if solve your problem.


Regards
Gaetano Mendola

Loading...