Re: Have pg_basebackup write "dbname" in "primary_conninfo"? - Mailing list pgsql-hackers

From Ajin Cherian
Subject Re: Have pg_basebackup write "dbname" in "primary_conninfo"?
Date
Msg-id CAFPTHDYnT1BMcs=C=BJeEJ85fFRbkP43Uyjqvvx-QGaN4Oq0-A@mail.gmail.com
Whole thread Raw
In response to Re: Have pg_basebackup write "dbname" in "primary_conninfo"?  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers


On Wed, Feb 21, 2024 at 2:04 PM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:

About the proposed patch, pg_basebackup cannot verify the validity of
the dbname. It could be problematic.

Although I haven't looked the original thread, it seems that the
dbname is used only by pg_sync_replication_slots(). If it is true,
couldn't we make the SQL function require a database name to make a
connection, instead of requiring it in physical-replication conninfo?

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

I agree. If the intention is to meet the new requirement of the sync-slot patch which requires a dbname in the primary_conninfo, then pseudo dbnames will not work, whether it be the username or just "replication". I feel if the user does not specify dbname explicitly in pg_basebackup it should be left blank in the generated primary_conninfo string as well.

regards,
Ajin Cherian
Fujitsu Australia

pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: 'Shutdown <= SmartShutdown' check while launching processes in postmaster.
Next
From: Ajin Cherian
Date:
Subject: Re: Have pg_basebackup write "dbname" in "primary_conninfo"?