Search Postgresql Archives

Re: Pgpool is crashing when terminating user session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hello all,
> 
> We are having master-slave setup with pgpool pointing, only to master
> server. Whenever i tried to terminate the long running session on db end
> using SELECT pg_terminate_backend(pid), pgpool is getting crashed.  Many
> blogs are saying this is the expected behaviour of pgpool, but my question
> is there anyway to terminate unwanted sessions on db without loosing other
> connections.
> 
> Because restarting entire system every time for a single trouble causing
> session is a big hectic for us.  Please share you ideas on this.

Those blogs are incorrect. From Pgpool-II 3.6 Pgpool-II supports
pg_terminate_backend(). Are you sure that you use "SELECT
pg_terminate_backend(pid)" from Pgpool-II session, not from a session
directly connecting to PostgreSQL?

Port 11000 is the port Pgpool-II is listening on.

[killing session]

$ psql -p 11000 test
psql (12.2)
Type "help" for help.


test=# select pg_terminate_backend(13877);
 pg_terminate_backend 
----------------------
 t
(1 row)

[killed session]

$ psql -p 11000 test
psql (12.2)
Type "help" for help.

test=# select pg_sleep(600);
FATAL:  terminating connection due to administrator command
ERROR:  unable to forward message to frontend
DETAIL:  FATAL error occured on backend
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
test=# 


Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux