mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -279,6 +279,11 @@ sub run_pg_rewind
|
||||
],
|
||||
'pg_rewind remote');
|
||||
|
||||
# Check that pg_rewind with dbname and --write-recovery-conf
|
||||
# wrote the dbname in the generated primary_conninfo value.
|
||||
like(slurp_file("$primary_pgdata/postgresql.auto.conf"),
|
||||
qr/dbname=postgres/m, 'recovery conf file sets dbname');
|
||||
|
||||
# Check that standby.signal is here as recovery configuration
|
||||
# was requested.
|
||||
ok( -e "$primary_pgdata/standby.signal",
|
||||
|
Reference in New Issue
Block a user