diff options
author | Masahiko Sawada <msawada@postgresql.org> | 2025-03-12 16:56:04 -0700 |
---|---|---|
committer | Masahiko Sawada <msawada@postgresql.org> | 2025-03-12 16:56:04 -0700 |
commit | 4ecdd4110d5cbaf107c0c85d16df78dffe0a9574 (patch) | |
tree | 7692f5f1a8d6387c06765fc05bb754980294b279 /src/include/fe_utils | |
parent | cdc1471cc7626ffd44416abe92d37de038a0a0ec (diff) | |
download | postgresql-4ecdd4110d5cbaf107c0c85d16df78dffe0a9574.tar.gz postgresql-4ecdd4110d5cbaf107c0c85d16df78dffe0a9574.zip |
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
Diffstat (limited to 'src/include/fe_utils')
-rw-r--r-- | src/include/fe_utils/recovery_gen.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/fe_utils/recovery_gen.h b/src/include/fe_utils/recovery_gen.h index 6412ffdaffa..c13f2263bcd 100644 --- a/src/include/fe_utils/recovery_gen.h +++ b/src/include/fe_utils/recovery_gen.h @@ -25,5 +25,6 @@ extern PQExpBuffer GenerateRecoveryConfig(PGconn *pgconn, char *dbname); extern void WriteRecoveryConfig(PGconn *pgconn, const char *target_dir, PQExpBuffer contents); +extern char *GetDbnameFromConnectionOptions(const char *connstr); #endif /* RECOVERY_GEN_H */ |