Allow dbname to be written as part of connstring via pg_basebackup's -R option.
authorAmit Kapila <[email protected]>
Thu, 21 Mar 2024 05:18:59 +0000 (10:48 +0530)
committerAmit Kapila <[email protected]>
Thu, 21 Mar 2024 05:20:33 +0000 (10:50 +0530)
commita145f424d5248a09d766e8cb503b999290cb3b31
treec78c1df755ced2b228c5d1c4a4b18fa67ba16c95
parent30e144287a72529c9cd9fd6b07fe96eb8a1e270e
Allow dbname to be written as part of connstring via pg_basebackup's -R option.

Commit cca97ce6a665 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
doc/src/sgml/ref/pg_basebackup.sgml
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/streamutil.h
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_rewind/pg_rewind.c
src/fe_utils/recovery_gen.c
src/include/fe_utils/recovery_gen.h