Re: PG_TERMINATE_BACKEND not working.

Поиск
Список
Период
Сортировка
От dinesh kumar
Тема Re: PG_TERMINATE_BACKEND not working.
Дата
Msg-id CALnrH7o0O6r4KQ-X9NJubpy8q901MoJaVqB_9U_c38ErdzQjow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PG_TERMINATE_BACKEND not working.  (Raghavendra <raghavendra.rao@enterprisedb.com>)
Список pgsql-general
Hi Harry, 

As you reported "pg_terminate_backend(pid)" returning "f" when executing. Please confirm are u getting any error like below .

postgres=# select pg_terminate_backend(342033);
WARNING:  PID 342033 is not a PostgreSQL server process
 pg_terminate_backend 
----------------------
 f
(1 row)

Not sure, what kind of error your are getting while executing it. So, requesting you to share your postgresql version, command what you have executed and it's result. However, pg_terminate_backend() is responsible to send "SIGTERM"  to it's OS process. From there onwards, OS will take care about the given process termination.

Can you give a try, by picking the IP's of the processes which are not getting killed from pg_stat_activity(client_addr column) and make REJECT entries in pg_hba.conf file as below:

host   all   all  <client_addr IP>   reject

and reload the cluster using pg_ctl -D $PGDATA reload

Now try killing the process 

pg_ctl kill TERM  <Process PID>
 
I am not sure why we are rejecting the incoming connections here. 

Regards,

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: flush buffer after connection disllowed
Следующее
От: r d
Дата:
Сообщение: Request for help setting up source tree