<div dir="ltr"><div dir="ltr">Op do 24 okt 2024 om 07:53 schreef Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>>:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Emond,<br>> In pool_get_user_credentials in pool_passwd.c (which it must reach because<br>
> health_check_password is empty), the password file is read via passwd_fd.<br>
> This file descriptor is rewound at line 362 (in 4.5.4). However, I wonder<br>
> what would happen if another process uses this same descriptor at the same<br>
> time. I suspect this might lead to one of the two processes (or maybe even<br>
> both) to get incorrect results.<br>
<br>
I think your analythis is correct. Yes, if multiple process are<br>
reading from the same file descriptor, it could lead to confusing<br>
results. Currently pgpool main process opens the pool_passwd file,<br>
then health check process inherit the file descriptor. This is not<br>
good. Attached is a patch to let the health check process to reopen<br>
the pool_passwd file so that it has it's own file descriptor.<br></blockquote><div><br></div><div>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.</div><div><br></div><div>Best regards,</div><div>Emond</div></div></div>