[pgpool-general: 9408] Re: Question about backend_application_name
Ron Johnson
ronljohnsonjr at gmail.com
Thu Mar 27 14:25:56 JST 2025
On Thu, Mar 27, 2025 at 1:06 AM Tatsuo Ishii <ishii at postgresql.org> wrote:
> > On Wed, Mar 26, 2025 at 9:43 PM Tatsuo Ishii <ishii at postgresql.org>
> wrote:
> >
> >> > On Wed, Mar 26, 2025 at 7:56 PM Tatsuo Ishii <ishii at postgresql.org>
> >> wrote:
> >> >
> >> >> > PgPool 4.5.4
> >> >> >
> >> >> > Three node pgpool cluster:
> >> >> > Node0 = Postgresql primary
> >> >> > Node1 = Postgresql streaming replica
> >> >> > Node2 = PgPool leader, where the VIP sits.
> >> >> >
> >> >> >
> >> >>
> >>
> https://www.pgpool.net/docs/45/en/html/runtime-config-backend-settings.html
> >> >> >
> >> >> > The docs consistently refer to setting backend_application_nameX to
> >> >> > "serverX", so that's what I did:
> >> >>
> >> >> "serverX" is just an example. You can use arbitrary name for
> >> >> backend_application_nameX as long as:
> >> >>
> >> >> a) It matches with the application name set in the primary_conninfo
> in
> >> >> postgresql.conf.
> >> >>
> >> >
> >> > On the replica (aka Node 1), there is no primary_coninfo in either
> >> > postgresql.conf or postgresql.auto.conf.
> >>
> >> Maybe you are using older version of PostgreSQL (11 or earlier)? Then
> >> you will have recovery.conf instead.
> >>
> >
> > Nope. PG 16.8.
> >
> > This is all I need to do on Node 1 to get replication running from Node
> 0.
> >
> > rm -r $PGDATA
> > pg_basebackup \
> > --pgdata=$PGDATA \
> > --dbname=service=basebackup \
> > --verbose --progress \
> > --checkpoint=fast \
> > --write-recovery-conf \
> > --wal-method=stream \
> > --create-slot --slot=pgstandby1 \
> > --compress=server-zstd
> > pg_ctl start -wt999
> >
> > pg_basebackup appends a conninfo string to $PGDATA/postgresql.auto.conf.
>
> Can you share the conninfo appended by pg_basebackup?
>
One very long line:
[postgres at FISPCDSPGS302b ~]$ cat $PGDATA/postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
primary_conninfo = 'user=replicator passfile=''/var/lib/pgsql/.pgpass''
channel_binding=prefer host=FISPCDSPGS302a.itocservices.com port=5432
sslmode=prefer sslcompression=0 sslcertmode=allow sslsni=1
ssl_min_protocol_version=TLSv1.2 gssencmode=prefer krbsrvname=postgres
gssdelegation=0 target_session_attrs=any load_balance_hosts=disable'
primary_slot_name = 'pgstandby1'
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20250327/ca5785c0/attachment.htm>
More information about the pgpool-general
mailing list