[pgpool-general: 3823] questions on connection pooling/reliability testing

Igor Gueths igor.gueths at rackspace.com
Sat Jun 20 01:27:54 JST 2015


Hello all,
whilst conducting some reliability testing, a couple of questions have
come up; one around the internals of connection pooling, and the other
around simulating an outage to trigger Pgpool node failover.

As far as connection pooling and the max_pool configuration parameter,
the docs seem to have this to say:
max_pool

    The maximum number of cached connections in pgpool-II children
processes. pgpool-II reuses the cached connection if an incoming
connection is connecting to the same database with the same user name.
If not, pgpool-II creates a new connection to the backend. If the number
of cached connections exceeds max_pool, the oldest connection will be
discarded, and uses that slot for the new connection.

    Default value is 4. Please be aware that the number of connections
from pgpool-II processes to the backends may reach num_init_children *
max_pool.

    This parameter can only be set at server start.

The above being said, is it even possible then for multiple connections
to the database backends using the same username/password to exceed
max_pool? If so, and the number of active connections ends up exceeding
max_pool, is the same discard behavior described prior applicable i.e.,
the oldest connection is dropped to accommodate the new incoming connection?
Regarding Pgpool node failover, what is the best way to simulate an
outage of this type without stopping the active Pgpool node so that the
standby takes over Delegate_IP? As a first attempt at this, I used
Iptables to drop all UDP heartbeat traffic to the active Pgpool node on
both ports 9694 and 9000, with no sign of the standby Pgpool node having
detected that the active node was down. Does one instead have to bring
down the interface specified in wd_device0? Something else entirely? Thanks!
-- 
Igor Gueths, Linux Systems Engineer Desk: +1.210.312.1952 Mobile:
+1.210.997.9397

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20150619/427040ac/attachment.sig>


More information about the pgpool-general mailing list