[Pgpool-general] Problems configuring pgpool-II 3.0 to failover gracefully and load balance queries

Tatsuo Ishii ishii at sraoss.co.jp
Tue Feb 22 23:15:10 UTC 2011


>> - When a node shuts down the pool drops *all* connections. (but subsequent
>> connections are correctly only sent to the backend that is still up)
>> - re-adding a node to the pool using pcp_attach_node causes the pool to
>> reset and all current connections will be closed
>> 
>> Is this expected behaviour?
> 
> Not for the two last ones. Probably Tatsuo could explain that.

Yes, they are expected behavior. Increasing/decreasing number of live
nodes always cause current connections closed. Otherwise we could risk
in making pgpool child processes be confused about the number of live
nodes.

There are lots of places in pgpool doing something like:

for (i=0;i<NUMBER_OF_LIVE_NODES;i++)
{
  do whatever necessary things...
}

If we want to avoid the connections closing, we need a mechanism to
protect above portion of code from changing number of live nodes.  I
just do not think of any efficient way to do this. Ideas are welcome.
--
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