[pgpool-general: 9238] Re: Sporadic health check failures due to authentication failure
Emond Papegaaij
emond.papegaaij at gmail.com
Thu Oct 24 17:51:55 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.
Best regards,
Emond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20241024/85c97a58/attachment.htm>
More information about the pgpool-general
mailing list