<div dir="ltr"><div>Thanks a lot Ron. I installed pgpool from source using the online documentation.<br><br></div><div>I am still not clear on the use of various users used by pgpool-ii, so more questions here.<br></div><div><br></div><div>1) sr_check_user<br></div><div>The postgresql streaming replication uses db role 'replicator' for connection from standby to primary. Should I use this db role as sr_check_user, or should I create a new db role to be used as sr_check_user?<br></div><div><br></div><div>2) health_check_user<br></div><div>I guess I can create a new db role for this use. Or should I use 'replicator' above for this user?<br><br></div><div>At present I have created a db role 'pgpool', grant
pg_read_all_data
to it, and used it as
both sr_check_user and
health_check_use.Would this be fine?<br></div><div><br></div><div>3) pgpool_passwd<br></div><div>This file is used by pgpool to manage user connection to postgresql. I am curious why can't pgpool just pass credentials supplied by clients to postgresql and leave it to postgresql to validate access requests, rather than having a separate user/pwd file.<br></div><div><br></div><div>Thanks</div><div>Long<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 16 Oct 2024 at 03:05, Ron Johnson <<a href="mailto:ronljohnsonjr@gmail.com">ronljohnsonjr@gmail.com</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"><div dir="ltr"><div dir="ltr">On Tue, Oct 15, 2024 at 11:45 AM Long Nguyen <<a href="mailto:nguyenxl059@gmail.com" target="_blank">nguyenxl059@gmail.com</a>> wrote:<br></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"><div dir="ltr"><div>Hi,<br><br></div><div>I am new to pgpool-ii and am setting it up. My env:</div><div>- postgresql 16 on ubuntu 22.04 on both primary and standby servers</div><div>- postgresql streaming replication is use <br></div><div>- install pgpool 4.5.4 on Primary server with streaming replication mode</div><div><br></div><div>I have followed online documentation and have some general questions.<br><br></div><div>1) Since pgpool accepts client connection and passes the same credential supplied by client to postgresql server, do we have the same entries for pgpool_hba.conf as in pg_hba.conf?<br></div></div></blockquote><div><br></div><div>Typically yes, but do not have to. Really, it depends on your PgPool configuration. That's because the Postgresql instance sees the server where the PgPool VIP is located.</div><div><br></div><div>For example, we have a three node PgPool cluster:</div><div>node_a: the database primary server. PG and PgPool installed.</div><div>node_b: the database streaming replica server. PG and PgPool installed.</div><div>node_c: where the VIP normally lives. Only PgPool installed.</div><div><br></div><div>The node_a pg_stat_activity.client_hostname field sees "node_c", not the application server(s) and user(s). Thus, you don't need them in the node_a and node_b pg_hba.conf files, but you do need them in the three pool_hba.conf files.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>2) The documentation recommends a separate OS user to be used to run pgpool. Do people do that or just use root? I created a 'pgpool' linux user and used it, but encountered various issues with file access permissions.<br></div></div></blockquote><div><br></div><div><div><div>I had a similar question when I first tried configuring PgPool.</div><div><br></div><div>The RPM packages supplied by <a href="https://www.pgpool.net/yum/rpms/4.5/" target="_blank">https://www.pgpool.net/yum/rpms/4.5/</a> all use the same OS user "postgres" that PostgreSQL itself uses. APT probably does something similar.</div></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>3) With the user we specify in the pcp.conf file, is it an OS user or postgresql server user? Or is it neither? (The doco does not make this clear.)<br></div></div></blockquote><div><br></div><div>It's a postgresql role.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>4) When is the user specified in the pcp.conf file referred to? Is this when we issue PCP commands (e.g. pcp_attach_node). How about $HOME/.pcppass file? If .pcppass
is used then the pcp.conf file would not be referred to?<br></div></div></blockquote><div><br></div><div>This is the same as Postgresql storing the role's password hash in pg_authid and the plaintext in ~/.pgpass.</div><div><br></div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Death to <Redacted>, and butter sauce.<div>Don't boil me, I'm still alive.<br><div><div><Redacted> crustacean!</div></div></div></div></div></div>
_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</blockquote></div>