Re: [ADMIN] terminate PG connections

2009-06-30 Thread raghu ram
On Tue, Jun 30, 2009 at 11:53 PM, Isabella Ghiurea < isabella.ghiu...@nrc-cnrc.gc.ca> wrote: > Hello PG Users, > I would like to know if there is a "clean" way to terminate running and > idle connections inside PG db ? > ( I see : pg_cancel_backend (pid) will send the connections to idle stage

Re: [ADMIN] terminate PG connections

2009-06-30 Thread Rafael Martinez
Plugge, Joe R. wrote: > #!/bin//bash > # > # Script: pgsession > # Author: Rao Kumar raoku...@netwolves.com > # Purpose: Utility to list/kill postgres database user sessions. > # Comments: Execute this script as "postgres" user (user who runs postmaster) > [] Is it safe to kill pg ses

Re: [ADMIN] terminate PG connections

2009-06-30 Thread Plugge, Joe R.
echo "Killing session (PID:$pid)" $KILL $pid else echo -n "Kill database session (PID:$pid) [y/n] ?:" read confirm if [ "$confirm" = "y" ];

[ADMIN] terminate PG connections

2009-06-30 Thread Isabella Ghiurea
Hello PG Users, I would like to know if there is a "clean" way to terminate running and idle connections inside PG db ? ( I see : pg_cancel_backend (pid) will send the connections to idle stage but not disconnecting from db , if you have > 100 idle connections to db and don't want to use