<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hello Tatsuo,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Yes, my test is as follows (on Pgpool 4.4.6, running on a RedHat 8 container [1]).</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The pool_passwd file is located at a custom path:</div><div class="gmail_default" style="font-family:tahoma,sans-serif">$ grep /etc/pgpool-II/pgpool.conf -P -e 'pool_passwd\s*='<br>pool_passwd = '/var/lib/pgpool/pool-passwd/pool_passwd'<br> </div><div class="gmail_default" style="font-family:tahoma,sans-serif">Create a list of new users to feed pg_enc utility:</div><div class="gmail_default" style="font-family:tahoma,sans-serif">$ echo 'user1:secret1' > /tmp/new-users.txt</div><div class="gmail_default" style="font-family:tahoma,sans-serif">$ pg_enc -k $PGPOOLKEYFILE -i /tmp/new-users.txt -m # writes entries to /etc/pgpool-II/pool_passwd</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Append new entries (assuming /etc/pgpool-II/pool_passwd was initially empty) to our custom pool_passwd (contents change, inode of target remains the same):</div><div class="gmail_default" style="font-family:tahoma,sans-serif">$ cat /etc/pgpool-II/pool_passwd >> /var/lib/pgpool/pool-passwd/pool_passwd <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Connect with new user "user1" (it works, without reloading). <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">[1] <a href="https://github.com/OpertusMundi/postgresql-cluster.helm/blob/master/pgpool/redhat/Dockerfile">https://github.com/OpertusMundi/postgresql-cluster.helm/blob/master/pgpool/redhat/Dockerfile</a></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Kind regards, Michail<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 19, 2024 at 12:14 PM Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> Hello Tatsuo and thanks for your quick response!<br>
> <br>
> My impression is that (as Ron also mentioned) the contents of pool_passwd<br>
> are read on every connection (authentication) attempt. I mean, at least for<br>
> a handful of tests I performed, the new users were seen without a need for<br>
> a reload (but this could also be luck[1]). So, is a reload really necessary<br>
> here?<br>
> <br>
> [1] e.g some Pgpool child processes see the updated version of pool_passwd,<br>
> while others see the old (cached?) one<br>
<br>
I confirmed using gdb that without pgpool reload, pool_passwd is never<br>
re-read at least on master branch. Are you sure that you are the only<br>
user of pgpool at that point? I suspect someone else executed pgpool<br>
reload.<br>
<br>
Best reagards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS K.K.<br>
English: <a href="http://www.sraoss.co.jp/index_en/" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en/</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div>