[pgpool-general: 4019] Re: potential work-around to safely issue pg_terminate_backend()

Tatsuo Ishii ishii at postgresql.org
Tue Sep 1 17:33:10 JST 2015


> Hi everyone,
> 
> Last night I came up with a possible work-around to terminate a
> connection using /pg_terminate_backend()/ which doesn't cause PGPool
> to Failover.  It requires some effort but it seems possible.
> 
> Before I post the proposal, I would like to know what's the best way
> to terminate a PGPool Connection process.  Once I know, I'll put that
> in the recipe.  :)
> 
> FWIW, I successfully tried a SIGINT and a SIGKILL.  The SIGKILL I
> don't care for as it cannot be trap()'d by the process.

Yes, SIGTERM, SIGINT ad SIGQUIT cause pgpool child to
exit. Unfortunately this has a side effect. Pgpool parent will not
fork a new child if child process exits in this case because the child
exits with status 0. Pgpool parent only forks new child when the child
exits with status other than 0.

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


More information about the pgpool-general mailing list