Pgtools::pg_kill - kill the postgresql processes with option
pg_kill shows the specified queries during execution by regular expression and other options. And also kill these specifid queries by -kill option. Options: -db database: set the database name -h host: host (localhost) -help: show this help -ignore_match_query: except matching query -ignore_match_state: except matching state -kill: kill query which matched condition -mq match_query: query match -ms match_state: state match -pr print: print killed queries info -p passward: set password -port: port number -r run_time: execute time -u user: Postgres user name -v version: version (Example) Print option just shows matched query. $ pg_kill -print -mq '.*' "192.168.32.12,5432,postgres,,dvdrental" ------------------------------- pid : 11493 start_time: 2016-03-20 16:11:17.57228+00 state : idle query : SELECT * FROM actor WHERE last_name like '%a%'; ------------------------------- pid : 11492 start_time: 2016-03-20 16:08:07.762289+00 state : idle query : select * from actor where actor_id < 200; You can kill the matched query with -kill option. Be careful to kill queries!! Please test on your environments. And exec this in your responsibility. $ pg_kill -kill -print -mq "like\s'\%.*\%'" "192.168.32.12,5432,postgres,,dvdrental" ------------------------------- Killed-pid: 11590 At : 2016/03/21 01:32:29 Query : SELECT * FROM actor WHERE last_name like '%a%'; Killed matched queries!
Tomoaki Otsuka, <otsuka.tt at gmail.com>
<otsuka.tt at gmail.com>
Please report any bugs or feature requests to the Github page.
You can find documentation for this module with the perldoc command.
perldoc Pgtools::pg_kill
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=./
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/./
CPAN Ratings
http://cpanratings.perl.org/d/./
Search CPAN
http://search.cpan.org/dist/.//
Copyright 2016 Tomoaki Otsuka.
This program is free software;
To install Pgtools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pgtools
CPAN shell
perl -MCPAN -e shell install Pgtools
For more information on module installation, please visit the detailed CPAN module installation guide.