1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Allow dbname to be written as part of connstring via pg_basebackup's -R option.

Commit cca97ce6a6 allowed dbname in pg_basebackup connstring and in this
commit we allow it to be written in postgresql.auto.conf when -R option is
used. The database name in the connection string will be used by the
logical replication slot synchronization on standby.

The dbname will be recorded only if specified explicitly in the connection
string or environment variable.

Masahiko Sawada hasn't reviewed the code in detail but endorsed the idea.

Author: Vignesh C, Kuroda Hayato
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CAB8KJ=hdKdg+UeXhReeHpHA6N6v3e0qFF+ZsPFHk9_ThWKf=2A@mail.gmail.com
This commit is contained in:
Amit Kapila
2024-03-21 10:48:59 +05:30
parent 30e144287a
commit a145f424d5
8 changed files with 127 additions and 8 deletions

View File

@ -243,7 +243,11 @@ PostgreSQL documentation
The <filename>postgresql.auto.conf</filename> file will record the connection
settings and, if specified, the replication slot
that <application>pg_basebackup</application> is using, so that
streaming replication will use the same settings later on.
streaming replication and <link linkend="logicaldecoding-replication-slots-synchronization">
logical replication slot synchronization</link> will use the same
settings later on. The dbname will be recorded only if the dbname was
specified explicitly in the connection string or <link linkend="libpq-envars">
environment variable</link>.
</para>
</listitem>
@ -809,7 +813,9 @@ PostgreSQL documentation
name in the connection string will be ignored
by <productname>PostgreSQL</productname>. Middleware, or proxies, used in
connecting to <productname>PostgreSQL</productname> might however
utilize the value.
utilize the value. The database name specified in connection string can
also be used by <link linkend="logicaldecoding-replication-slots-synchronization">
logical replication slot synchronization</link>.
</para>
</listitem>
</varlistentry>