[pgpool-general: 3389] Re: [PATCH] pgpool2 parent process doesn't finish if init_system_db_connection fails

Muhammad Usama m.usama at gmail.com
Mon Dec 29 23:00:53 JST 2014


Hi Sadayuki

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.

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.

http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=041a04de0050a52644103cf91629c9de98e6c753

Thanks
Best Regards!,
Muhammad Usama

On Thu, Dec 11, 2014 at 6:43 AM, Sadayuki Furuhashi <frsyuki at gmail.com>
wrote:

> Sorry, I guess I failed to attach the patch.
>
>
>
> --
> Sadayuki Furuhashi
> http://fluentd.org http://msgpack.org
> twitter:@frsyuki
>
> 2014/12/10 17:18, Sadayuki Furuhashi <frsyuki at gmail.com>:
>
> > Hi,
> >
> > I found that init_system_db_connection() calls ereport(ERROR) before
> sigsetjmp().
> > An influence of this issue is that child processes won't exit by
> themselves when init_system_db_connection()
> > fails and sending SIGTERM to the parent process doesn't complete
> shutdown process appropriately.
> >
> > This patch replaces ereport(ERROR) with ereport(WARNING) + child_exit(1).
> > A trade-off is that pgpool2 shows a lot of "failed to make persistent
> system db connection" message to the log
> > because a child process exists immediately and the parent process keeps
> restarting them immediately.
> >
> > --
> > Sadayuki Furuhashi
> > http://fluentd.org http://msgpack.org
> > twitter:@frsyuki
> >
> > <system_db_connect_error.patch>
>
>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20141229/fc2a47cc/attachment.html>


More information about the pgpool-general mailing list