[pgpool-hackers: 3464] Re: Bug in pool_check_fd

Tatsuo Ishii ishii at sraoss.co.jp
Fri Oct 18 07:40:29 JST 2019


> Hi T Ishii,
> 
> Thanks for patch.
> What is the impact of this on 3.7.11?.Is health is not properly work?

Yes. health_check_timeout does not work as expected if following
conditions are all met:

1) The OS PostgreSQL is running on is up.

2) PostgreSQL does not respond to connection request from clients
   including Pgpool's health check process. In my test, I used SIGSTOP
   to simulate the case but it is possible that it could happen when
   the system is overloaded.

>  Could you please share the steps to apply this patch to 3.7.11.

$ cd pgpool-II-3.7.11
$ patch -b -p1 < /path/to/patch/health_check.diff

> Thanks,
> Siva.
> 
> On Wednesday, October 16, 2019, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
> 
>> 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
>>


More information about the pgpool-hackers mailing list