[pgpool-hackers: 3459] Bug in pool_check_fd

Tatsuo Ishii ishii at sraoss.co.jp
Wed Oct 16 16:04:32 JST 2019


I accidentally found a bug in pool_check_fd in 3.7 and above.
If does following check:

			if (processType == PT_MAIN && processState == PERFORMING_HEALTH_CHECK && errno == EINTR && health_check_timer_expired)

>From 3.7, health check has been given separate processType because it
has become separate process from main. Thus this should be fixed to:

			if (processType == PT_HEALTH_CHECK && errno == EINTR && health_check_timer_expired)

In 4.0 or earlier this bug effectively disables health_check_timeout
while reading packets from backend. For 4.1 or later, this does not
affect because pool_read in health check because in the code path
pool_check_fd does not gets called.

Attached is a patch to fix the bug.

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: pool_check_fd.diff
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20191016/0fe119ea/attachment.bin>


More information about the pgpool-hackers mailing list