Re: terminate PG connections

Поиск
Список
Период
Сортировка
От raghu ram
Тема Re: terminate PG connections
Дата
Msg-id d331f2ee0906301840t7a4c0678y78b2c3cdb60d5d54@mail.gmail.com
обсуждение исходный текст
Ответ на terminate PG connections  (Isabella Ghiurea <isabella.ghiurea@nrc-cnrc.gc.ca>)
Список pgsql-admin


On Tue, Jun 30, 2009 at 11:53 PM, Isabella Ghiurea <isabella.ghiurea@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 but not disconnecting from db , if you have  > 100  idle connections to db  and don't want to use  the OS " kill "  )

Thank you
Isabella


--
-----------------------------------------------------------
Isabella A. Ghiurea
Isabella.Ghiurea@nrc-cnrc.gc.ca
Canadian Astronomy Data Centre | http://www1.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/ National Research Council of Canada, Herzberg Institute of Astrophysics 5071 West Saanich Road, Victoria BC V9E 2E7, Canada
Phone: 250 363-3446 fax: 250 363-0045


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


Hi,


To kill the process and session you can do like follows:

 

(1) Edit  " pg_hba.conf  " file which is in your data directory and  at the bottom of the file add a line as follows:

 

 host all all <client IP address/32>  reject

 

(2)And reload the database.

pg_ctl –D <your data directory path> reload

 

(3)After that run the following command:

 

$ pg_ctl -D <your data directory path> kill TERM <procpid>  

Thanks & Regards,
Raghu

В списке pgsql-admin по дате отправления:

Предыдущее
От: Emanuel Calvo Franco
Дата:
Сообщение: Re: Optimal Flexible Architecture or Optimal Configuration Layout for Postgres
Следующее
От: raghu ram
Дата:
Сообщение: Re: Restiring pg_dump text file