[pgpool-hackers: 3153] Proposal: limiting number of frontends differently

Tatsuo Ishii ishii at sraoss.co.jp
Mon Nov 26 15:21:33 JST 2018


This is a proposal for Pgpool-II 4.1.

Currently Pgpool-II accepts up to num_init_children frontends and
queues up more connection requests until one of child process becomes
free. This mostly works well, but if each session take long time, the
queue grows long and the whole system does not work smoothly.

To overcome the problem, I propose a new way to deal with many
connection requests from frontend: just complain and refuses to
connect to Pgpool-II if number of num_init_children is already filled
up. This is exactly the same behavior as PostgreSQL.

Attached PoC patch demonstrates how the new behavior works. If
connection request comes more than num_init_children - 1 comes in, the
frontend gets an error:

	 FATAL:  Sorry, too many clients already

and it cannot connect to Pgpool-II.

I think existing behavior of Pgpool-II is suitable for some users but
others might want the new way, and we should provide a switch to allow
users to choose their favorite behaviors.

Maybe something like "queue_incoming_connection"? If true, then
existing behavior is chosen (queue incoming connections).

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: max_connections.diff
Type: text/x-patch
Size: 2702 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20181126/d5110974/attachment.bin>


More information about the pgpool-hackers mailing list