<div dir="ltr">Hi Sadayuki<br><br>Thanks for pointing out the problem and for the patch. This issue is not only confined to the errors coming from init_system_db_connection(). The problem is that the overall behavior of pgpool is little confused in the situations of child process start-up failures. So after discussion with Tatsuo Ishii it was decided that in such cases, the best bid would be to shutdown pgpool main process and user must fix the problem before restarting the pgpool-II.<br><br>So for fixing this I have patched the ereport() API and reaper() function to fix the behaviour of system in case of any pgpool-II process has trouble starting up.<br><br><a href="http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=041a04de0050a52644103cf91629c9de98e6c753">http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=041a04de0050a52644103cf91629c9de98e6c753<br></a><br>Thanks<br>Best Regards!,<br>Muhammad Usama</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 11, 2014 at 6:43 AM, Sadayuki Furuhashi <span dir="ltr">&lt;<a href="mailto:frsyuki@gmail.com" target="_blank">frsyuki@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry, I guess I failed to attach the patch.<br>
<br><br>
<br>
--<br>
Sadayuki Furuhashi<br>
<a href="http://fluentd.org" target="_blank">http://fluentd.org</a> <a href="http://msgpack.org" target="_blank">http://msgpack.org</a><br>
twitter:@frsyuki<br>
<br>
2014/12/10 17:18, Sadayuki Furuhashi &lt;<a href="mailto:frsyuki@gmail.com">frsyuki@gmail.com</a>&gt;:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I found that init_system_db_connection() calls ereport(ERROR) before sigsetjmp().<br>
&gt; An influence of this issue is that child processes won&#39;t exit by themselves when init_system_db_connection()<br>
&gt; fails and sending SIGTERM to the parent process doesn&#39;t complete shutdown process appropriately.<br>
&gt;<br>
&gt; This patch replaces ereport(ERROR) with ereport(WARNING) + child_exit(1).<br>
&gt; A trade-off is that pgpool2 shows a lot of &quot;failed to make persistent system db connection&quot; message to the log<br>
&gt; because a child process exists immediately and the parent process keeps restarting them immediately.<br>
&gt;<br>
&gt; --<br>
&gt; Sadayuki Furuhashi<br>
&gt; <a href="http://fluentd.org" target="_blank">http://fluentd.org</a> <a href="http://msgpack.org" target="_blank">http://msgpack.org</a><br>
&gt; twitter:@frsyuki<br>
&gt;<br>
&gt; &lt;system_db_connect_error.patch&gt;<br>
<br>
<br>_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
<br></blockquote></div><br></div>