<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:"Microsoft YaHei UI", "Microsoft YaHei", ????, SimSun, ??, sans-serif;font-size:11pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="color: #282828; font-family: &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, 微软雅黑, simsun, 宋体, sans-serif; font-size: 15px; background-color: #ffffff;">Hello&nbsp;Usama and&nbsp;Hackers,</span></p>
<p><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>​I have tested the pgpool connection pool.And I think there are some parts need&nbsp;to be enhanced.</p>
<p><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>When you set the parameter&nbsp;num_init_children = 32.only 32 child processes will be forked and waiting for the connection from client.<span style="font-size: 12pt;">E</span><span style="font-size: 12pt;">ach child process can only receive
 one client connection,t</span><span style="font-size: 12pt;">herefore, only 32 clie</span><span style="font-size: 12pt;">n</span><span style="font-size: 12pt;">ts can connect to pgpool at the same&nbsp;time.The extra connections,before connection, can only wait
 for the previous connection to be disconnected.So,can we change the waiting connection structure of pgpool.&nbsp;When pgpool starts ,we can fork ten child processes to wait for the client to connect.When the&nbsp;child process receives the connection request, it creates
 a new child process to&nbsp;maintain&nbsp;the session connection.</span></p>
<p><span style="font-size: 12pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>there is also another one which should be enhance is the connection pool.</span><span style="font-size: 12pt;">Now, for each&nbsp;connection, the child process can only receive one client connection. Therefore,
 the connection pool in the child process does not play a global reuse&nbsp;</span><span style="font-size: 12pt;">effect.And each connection will re-initialize the connection pool. Therefore we should implement a global connection pool to achieve the effect of back&nbsp;end&nbsp;reuse.However
 ,we should confirm how many connections the global connection pool should maintain.And also we should confirm that if the connection pool is&nbsp;full,how&nbsp;should we respond to the arrival of new&nbsp;connections</span><span style="font-size: 12pt;">.I can come up with
 two kind of solutions.</span></p>
<p><span style="font-size: 12pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>The first one is waiting until the connection in the connection pool disconnected.and then receive the new connection.The second one,We should check the number of connection&nbsp;and&nbsp;&nbsp;the last access time&nbsp;of the&nbsp;connection
 in connection pool.And we replace the connection which has the oldest access time in the connection pool to the new connection.or we periodic detection the access time&nbsp;of each connection,and throw away the connections whose access time exceed a certain value.then
 we can use the extra space in connection pool.</span></p>
<p><span style="font-size: 12pt;">&nbsp;&nbsp;&nbsp;&nbsp;​In my </span>opinion<span style="font-size: 12pt;">,these two aspects need to be enhanced.How about your opinion.And what do you think we need to do to enhance these two aspects.Any suggestions and comments are welcome.</span><br>
</p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<div style="color: #282828; font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff; margin-top: 0px; margin-bottom: 0px;">
<font face="Calibri,Arial,Helvetica,sans-serif"><font face="Microsoft YaHei UI,Microsoft YaHei,微软雅黑,SimSun,宋体,sans-serif" size="1"><span style="font-size: 13.32px;">Thanks</span></font><br>
<font face="Microsoft YaHei UI,Microsoft YaHei,微软雅黑,SimSun,宋体,sans-serif" size="1"><span style="font-size: 13.32px;">Best regards</span></font><br>
Zhou Jianshen</font></div>
<div style="color: #282828; font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff; margin-top: 0px; margin-bottom: 0px;">
<font face="Calibri,Arial,Helvetica,sans-serif"><a href="mailto:zhoujianshen@highgo.com" target="_blank"><font face="verdana" size="1"><span style="font-size: 13.32px;">zhoujianshen@highgo.com</span></font></a><font face="verdana" size="1"><span style="font-size: 13.32px;">​​</span></font></font></div>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><br>
<br>
</p>
<p><br>
</p>
</div>
</body>
</html>