[pgpool-hackers: 475] Re: To close listen socket when smart shutdown request is made

Tatsuo Ishii ishii at postgresql.org
Sat Mar 29 17:51:49 JST 2014


Junegunn,

Great analythis and patch! The patch worked great for me except that
it did not take care UNIX domain socket. So I just added handling of
UNIX domain socket and committed. Thank you!

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

> Currently, listen socket is left open while graceful (smart) shutdown is
> ongoing. In practice, shutdown can take long due to long-running queries,
> lock waits, etc. Since pgpool process during the period still listens on
> the port, further connection requests can be made and queued, only to fail
> when the shutdown process is complete.
> 
> I think it would be better to close listen socket immediately when a
> shutdown request is received so that the further connection requests are
> refused right away. This is especially important when multiple pgpool
> servers are backed by a load balancer which has to realize the status of
> the listening ports and act accordingly.
> 
> What do you think? I'm attaching a patch which does that, that we're
> planning to apply on our production servers. Test shows that it works as
> expected. Will there be any side effects?
> 
> Thanks,
> Junegunn Choi.


More information about the pgpool-hackers mailing list