[pgpool-general: 9239] Re: Sporadic health check failures due to authentication failure
Tatsuo Ishii
ishii at postgresql.org
Fri Oct 25 10:16:52 JST 2024
> Op do 24 okt 2024 om 07:53 schreef Tatsuo Ishii <ishii at postgresql.org>:
>
>> Hi Emond,
>> > In pool_get_user_credentials in pool_passwd.c (which it must reach
>> because
>> > health_check_password is empty), the password file is read via passwd_fd.
>> > This file descriptor is rewound at line 362 (in 4.5.4). However, I wonder
>> > what would happen if another process uses this same descriptor at the
>> same
>> > time. I suspect this might lead to one of the two processes (or maybe
>> even
>> > both) to get incorrect results.
>>
>> I think your analythis is correct. Yes, if multiple process are
>> reading from the same file descriptor, it could lead to confusing
>> results. Currently pgpool main process opens the pool_passwd file,
>> then health check process inherit the file descriptor. This is not
>> good. Attached is a patch to let the health check process to reopen
>> the pool_passwd file so that it has it's own file descriptor.
>>
>
> Thank you for the quick response and the patch. I've deployed a patched
> version of pgpool onto a testing environment, which we will monitor for the
> upcoming week. Until we've verified the patch actually fixes the issue,
> we'll use the health_check_password setting as a workaround.
OK, I'm looking forward to hearing from you about the testing result.
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
More information about the pgpool-general
mailing list