<div dir="ltr"><div dir="ltr">On Wed, Mar 26, 2025 at 7:56 PM Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> PgPool 4.5.4<br>
> <br>
> Three node pgpool cluster:<br>
> Node0 = Postgresql primary<br>
> Node1 = Postgresql streaming replica<br>
> Node2 = PgPool leader, where the VIP sits.<br>
> <br>
> <a href="https://www.pgpool.net/docs/45/en/html/runtime-config-backend-settings.html" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/45/en/html/runtime-config-backend-settings.html</a><br>
> <br>
> The docs consistently refer to setting backend_application_nameX to<br>
> "serverX", so that's what I did:<br>
<br>
"serverX" is just an example. You can use arbitrary name for<br>
backend_application_nameX as long as:<br>
<br>
a) It matches with the application name set in the primary_conninfo in<br>
postgresql.conf.<br></blockquote><div><br></div><div>On the replica (aka Node 1), there is no primary_coninfo in either postgresql.conf or postgresql.auto.conf.</div><div><br></div><div>pg_stat_wal_receiver.conninfo has this section: fallback_application_name="walreceiver".</div><div><br></div><div>(I initiate replication using "pg_basebackup --wal-method=stream --create-slot --slot=foo.)</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">
<br>
b) No same application names are used in all primary_conninfo.<br>
<br>
> But should it really be set to "walreceiver"? Should both<br>
> backend_application_name0 and backend_application_name1 be set to<br>
> "walreceiver" even though it's only running on Node1?<br>
<br>
I never tried it but probably yes. However I recommend in general to<br>
set unique application names for each<br>
backend_application_nameX. Someday you might want to add more replica.<br></blockquote><div><br></div><div>How does the second replica know to set it's name different from the first?</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">
<br>
> cdsmultip=# pgpool show backend_application_name2;<br>
>Â backend_application_name2<br>
> ---------------------------<br>
> <br>
> (1 row)<br>
<br>
What's this? You said you only have one replica.<br><br></blockquote><div>Â </div></div><div>You can successfully run "pgpool show backend_application_name2;" even though only _name0 and _name1 are defined in pgpool.conf.</div><div><br></div><div>I ran the command just for completeness.</div><div><br></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> lobster!</div></div></div></div></div></div>