pg_rewind: Add dbname to primary_conninfo when using --write-recovery-conf.
Masahiko Sawada <msawada@postgresql.org>
pg_rewind: Add dbname to primary_conninfo when using --write-recovery-conf. This commit enhances pg_rewind's --write-recovery-conf option to include the dbname in the generated primary_conninfo value when specified in the --source-server option. With this modification, the rewound server can connect to the primary server without manual configuration file modifications when sync_replication_slots is enabled. Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Peter Smith <smithpb2250@gmail.com> Discussion: https://postgr.es/m/CAD21AoAkW=Ht0k9dVoBTCcqLiiZ2MXhVr+d=j2T_EZMerGrLWQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/pg_rewind.sgml | modified | +4 −2 |
| src/bin/pg_basebackup/pg_basebackup.c | modified | +1 −1 |
| src/bin/pg_basebackup/streamutil.c | modified | +0 −69 |
| src/bin/pg_basebackup/streamutil.h | modified | +0 −2 |
| src/bin/pg_rewind/pg_rewind.c | modified | +4 −2 |
| src/bin/pg_rewind/t/RewindTest.pm | modified | +5 −0 |
| src/fe_utils/recovery_gen.c | modified | +66 −0 |
| src/include/fe_utils/recovery_gen.h | modified | +1 −0 |
Documentation touched
Discussion
- pg_rewind with --write-recovery-conf option doesn't write dbname to primary_conninfo value. 10 messages · 2025-01-29 → 2025-03-13