[pgpool-general: 9248] Re: Sporadic health check failures due to authentication failure
Tatsuo Ishii
ishii at postgresql.org
Wed Oct 30 07:27:30 JST 2024
Hi Emond,
Thank you for the report! The fix has been already in the git
repository and will appear in the next minor releases.
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=ec6740f7259f010e2ee312335239239a606a0682
https://pgpool.net/mediawiki/index.php/Roadmap
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
> Hi,
>
> We've been running the patch on our testing environment for almost a week
> now and haven't seen a single authentication error since the fix. Before
> the patch we saw multiple errors on most days. So, I'd say the issue is
> fixed.
>
> Best regards,
> Emond
>
> Op vr 25 okt 2024 03:17 schreef Tatsuo Ishii <ishii at postgresql.org>:
>
>> > 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